Open
Description
Code Sample, a copy-pastable example if possible
current -> query_config["aggregation"] = "5min"
proposed -> query_config["aggregation"] = "PT5M"
resampled_dataframe = dataframe.resample(query_config["aggregation"], how = query_config["aggregation_type"], closed = query_config["closed"])
Problem description
https://en.wikipedia.org/wiki/ISO_8601#Durations
Current behavior uses non standardized markup for time duration, wich can cause errors and confusion. Implementing ISO8601 duration grantees standardized solution for time duration in PANDAS. It does not have to replace the current system rather extend it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mroeschke commentedon Sep 25, 2018
I think this is a reasonable suggestion.
IIRC @WillAyd allowed
to_timedelta
to parse these durations. Some careful consideration will need to be address regarding how they are mapped to ourTick/DateOffset
classes and existing offset aliases.WillAyd commentedon Sep 25, 2018
Agreed this makes sense. Support for
to_timedelta
was added in #21933 so can certainly leverage that as a reference for potential implementation. PRs welcomeHaigutus commentedon Oct 3, 2018
Maybe this could be reused - https://bitbucket.org/nielsenb/aniso8601
Flix6x commentedon Mar 14, 2021
Compatibility with ISO8601 durations may not be possible before #22864 is resolved, because "P1D" (an ISO8601 nominal duration of 1 day) denotes a calendar day rather than 24 hours.