Skip to content

Commit

Permalink
Update weldx/tags/time/timedeltaindex.py
Browse files Browse the repository at this point in the history
Co-authored-by: Çağtay Fabry <[email protected]>
  • Loading branch information
marscher and CagtayFabry authored Mar 12, 2024
1 parent 737c7e4 commit 2e6c519
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions weldx/tags/time/timedeltaindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@

def _handle_converted_pd_tdi_units(node: TaggedDict):
"""Convert changed units in Pandas.Datetimeindex to valid values."""
unit = node["freq"][-1]
if unit in PANDAS_OLD_UNIT_SUFFIXES.keys():
node["freq"] = node["freq"][:-1] + PANDAS_OLD_UNIT_SUFFIXES[unit]
for suf in PANDAS_OLD_UNIT_SUFFIXES:
node["freq"] = node["freq"].replace(suf, PANDAS_OLD_UNIT_SUFFIXES[suf])


class TimedeltaIndexConverter(WeldxConverter):
Expand Down

0 comments on commit 2e6c519

Please sign in to comment.