Skip to content

Commit

Permalink
use keyword-only params in sort_index
Browse files Browse the repository at this point in the history
in methods where inplace is allowed, non-keyword args will become deprecated soon:
pandas-dev/pandas#41506

This does not change any current behavior, but removes a deprecation warning when using the latest pandas version
  • Loading branch information
maurerle authored and fleimgruber committed May 14, 2024
1 parent 8a7b71a commit c25c2e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ def query_generation_per_plant(
df = df.tz_convert(area.tz)
# Truncation will fail if data is not sorted along the index in rare
# cases. Ensure the dataframe is sorted:
df = df.sort_index(0)
df = df.sort_index(axis=0)
df = df.truncate(before=start, after=end)
return df

Expand Down

0 comments on commit c25c2e8

Please sign in to comment.