-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👌 Handle pandas.Series in deltatime_to_utc_time conversion
Patches #40. The deltatime_to_utctime converter didn't handle pandas.Series properly, as the start_epoch variable would have an index of 0, and the datetime + timedelta operation would only get applied at index 0 instead of along the whole column. Calling squeeze() converts the pandas.Series to a pandas.Timestamp, so that the addition operation is broadcast to the whole column. This also works on an xarray.DataArray and numpy.array. Doesn't work for a dask.Series, but we can work that out when the need arises.
- Loading branch information
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters