Change date format to string for campatibility with Windows systems

This commit is contained in:
2025-09-30 00:31:59 +02:00
parent d46f3319f3
commit 3431bc8a4d
5 changed files with 18 additions and 13 deletions

View File

@@ -213,7 +213,7 @@ def main():
"Sample Flow Controller Read (vccm)": pd.Series(
dtype="float64"
),
"date": pd.Series(dtype="datetime64[ns]"),
"date": pd.Series(dtype="str"),
"hour": pd.Series(dtype="int64"),
},
index=pd.DatetimeIndex([]),
@@ -340,7 +340,7 @@ def main():
delete_partition_if_exists(
output_path=f"{run_config['output']}/pbp_calibrated",
partition_values={
"date": chunk_start.strftime("%Y-%m-%d 00:00:00"),
"date": chunk_start.strftime("%Y-%m-%d"),
"hour": chunk_start.hour,
},
)
@@ -411,9 +411,8 @@ def main():
)
# 2) cast partition columns *before* Dask strips them off
ddf_conc["date"] = dd.to_datetime(ddf_conc["date"]).astype(
"datetime64[ns]"
)
# Keep date as string to avoid Windows path issues with datetime partitions
ddf_conc["date"] = ddf_conc["date"].astype("str")
ddf_conc["hour"] = ddf_conc["hour"].astype("int64")
conc_future = ddf_conc.to_parquet(