Skip to content

Commit

Permalink
Resolve pandas future warnings (FlexMeasures#573)
Browse files Browse the repository at this point in the history
* Pandas==1.5 requires explicitly set group_keys argument in groupby method

Signed-off-by: F.N. Claessen <felix@seita.nl>

* Upgrade timely-beliefs to resolve more Pandas FutureWarnings

Signed-off-by: F.N. Claessen <felix@seita.nl>

Signed-off-by: F.N. Claessen <felix@seita.nl>
  • Loading branch information
Flix6x committed Jan 3, 2023
1 parent ad56d9b commit 2c25bc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flexmeasures/data/services/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def drop_unchanged_beliefs(bdf: tb.BeliefsDataFrame) -> tb.BeliefsDataFrame:
# Remove unchanged beliefs with respect to what is already stored in the database
return (
bdf.convert_index_from_belief_horizon_to_time()
.groupby(level=["belief_time", "source"], as_index=False)
.groupby(level=["belief_time", "source"], group_keys=False, as_index=False)
.apply(_drop_unchanged_beliefs_compared_to_db)
)

Expand Down
2 changes: 1 addition & 1 deletion requirements/app.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tldextract
pyomo>=5.6
tabulate
timetomodel>=0.7.1
timely-beliefs[forecast]>=1.16
timely-beliefs[forecast]>=1.18
python-dotenv
# a backport, not needed in Python3.8
importlib_metadata
Expand Down
2 changes: 1 addition & 1 deletion requirements/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ tabulate==0.8.10
# via -r requirements/app.in
threadpoolctl==3.1.0
# via scikit-learn
timely-beliefs[forecast]==1.16.0
timely-beliefs[forecast]==1.18.0
# via -r requirements/app.in
timetomodel==0.7.1
# via -r requirements/app.in
Expand Down

0 comments on commit 2c25bc8

Please sign in to comment.