Skip to content
Snippets Groups Projects
Commit b8bb853b authored by Julia Signell's avatar Julia Signell
Browse files

Merge branch 'js/fix-datetime' into 'primarykeyv2'

Potentially fix datetime

See merge request !105
parents c5527d5a 30cba56a
No related branches found
No related tags found
2 merge requests!105Potentially fix datetime,!61Additions: primary keys, speed ups (preprocessing and postprocessing), tests, scalene, reorg entire fireatlas
......@@ -75,9 +75,11 @@ def read_allpixels(
location: Location = None,
):
filepath = allpixels_filepath(tst, ted, region, location=location)
df = pd.read_csv(filepath, index_col="uuid")
for col in ["t", "datetime", "ext_until"]:
df[col] = pd.to_datetime(df[col], format='ISO8601')
return pd.read_csv(filepath, index_col="uuid", parse_dates=["t"])
return df
def allfires_filepath(
tst: TimeStep,
......
......@@ -314,6 +314,7 @@ def read_preprocessed(
):
filename = preprocessed_filename(t, region=region, location=location)
df = pd.read_csv(filename).set_index("uuid").assign(t=t2dt(t))
df["datetime"] = pd.to_datetime(df["datetime"], format='ISO8601')
return df
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment