Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix date handling for 2D timeseries CSV layout #302

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions egret/parsers/rts_gmlc/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,9 @@ def _read_2D_timeseries_file(file_name:str, minutes_per_period:int,
period is included in the results. Like a typical python range, the returned data includes
the start_time but does not include the end_time.
"""
_date_parser = lambda *columns: datetime(*map(int,columns[0:3]))
df = pd.read_csv(file_name,
header=0,
parse_dates=[[0, 1, 2]],
date_parser=_date_parser,
parse_dates=[['Year', 'Month', 'Day']],
index_col=0)
df.sort_index(inplace=True)

Expand Down