Skip to content

Commit

Permalink
Align units with pandas.Timedelta API
Browse files Browse the repository at this point in the history
  • Loading branch information
t-jakubek committed Feb 1, 2024
1 parent 2f0eba8 commit 099e958
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 099e958

Please sign in to comment.