Skip to content

Commit

Permalink
Merge pull request #291 from t-jakubek/bug/pandas_timedelta_futurewar…
Browse files Browse the repository at this point in the history
…ning

Address FutureWarning: 'H' is deprecated and will be removed in a future version. Please use 'h' instead of 'H'.
  • Loading branch information
jonasvdd committed Feb 5, 2024
2 parents 2f0eba8 + 099e958 commit 1abda53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plotly_resampler/figure_resampler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def round_td_str(td: pd.Timedelta) -> str:
[`timedelta_to_str`][figure_resampler.utils.timedelta_to_str]
"""
for t_s in ("D", "H", "min", "s", "ms", "us", "ns"):
for t_s in ("D", "h", "min", "s", "ms", "us", "ns"):
if td > 0.95 * pd.Timedelta(f"1{t_s}"):
return timedelta_to_str(td.round(t_s))

Expand Down

0 comments on commit 1abda53

Please sign in to comment.