From 06da7f4c700ec4c01787d57189512d1d6a90f01a Mon Sep 17 00:00:00 2001 From: Darryl Melander Date: Mon, 3 Apr 2023 13:25:00 -0600 Subject: [PATCH] Fix date handling for 2D timeseries CSV layout --- egret/parsers/rts_gmlc/parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/egret/parsers/rts_gmlc/parser.py b/egret/parsers/rts_gmlc/parser.py index 2fb236b9..f5b75043 100644 --- a/egret/parsers/rts_gmlc/parser.py +++ b/egret/parsers/rts_gmlc/parser.py @@ -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)