From 92bd5866f4b2d029080047ae0ffc0e8ef39290b9 Mon Sep 17 00:00:00 2001 From: sssangha Date: Sat, 14 Nov 2020 18:21:54 -0800 Subject: [PATCH] Insure datetimes are passed as timestamps, as expected by variogram class (#214) --- tools/RAiDER/statsPlot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/RAiDER/statsPlot.py b/tools/RAiDER/statsPlot.py index a97b2ade1..f52c151b2 100755 --- a/tools/RAiDER/statsPlot.py +++ b/tools/RAiDER/statsPlot.py @@ -728,6 +728,7 @@ def _reader(self): try: data = pd.read_csv(self.fname, parse_dates = ['Datetime']) data['Date'] = data['Datetime'].apply(lambda x: x.date()) + data['Date'] = data['Date'].apply(lambda x: dt.datetime.strptime(x.strftime("%Y-%m-%d"),"%Y-%m-%d")) except: data = pd.read_csv(self.fname, parse_dates = ['Date'])