Skip to content
Snippets Groups Projects
Commit b014e385 authored by Nicolas Schmid's avatar Nicolas Schmid
Browse files

fix: add fix so that hydraulic datetime stamps are returned as IO Time string

parent ad8384a4
No related branches found
Tags v1.0.1
2 merge requests!36fix: add fix so that hydraulic datetime stamps are returned as IO Time string,!35fix: add fix so that hydraulic datetime stamps are returned as IO Time string
Pipeline #2873 passed
......@@ -28,6 +28,10 @@ def real_values_to_json(df: pd.DataFrame, drop_cols: list[str] = None) -> str:
df = df.stack(level=1)
if 'datetime' in df.columns:
df['datetime'] = pd.to_datetime(
df['datetime']).dt.strftime('%Y-%m-%dT%H:%M:%S')
if df_not_real is not None:
result = df.groupby(level=0) \
.apply(lambda x: x.droplevel(0).to_dict()
......
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