Commit b329b988 authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

Iceblock Processor. Correct FutureWarning.

parent 7d24c990
Pipeline #115663 passed with stages
in 3 minutes and 27 seconds
......@@ -3,27 +3,6 @@
<component name="CsvFileAttributes">
<option name="attributeMap">
<map>
<entry key="/cfatools/processor/flow.py">
<value>
<Attribute>
<option name="separator" value=":" />
</Attribute>
</value>
</entry>
<entry key="/cfatools/tests/test_flow/tubing_volumes.csv">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
<entry key="/cfatools/tests/test_processor/test_flow.py">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
<entry key="/cfatools/tests/test_processor/tubing_volumes.csv">
<value>
<Attribute>
......@@ -31,13 +10,6 @@
</Attribute>
</value>
</entry>
<entry key="/config/tubing_volumes.csv">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
</map>
</option>
</component>
......
......@@ -12,14 +12,14 @@ def get_melting_timeseries(iceblock_df: pd.DataFrame) -> pd.DataFrame:
# Get the mapping between iceblock id and iceblock name (assuming that the last name's modification is the
# good one.
mapping_df = iceblock_df[["datetime", "id", "name"]].copy()
mapping_df = mapping_df.groupby("id")["id", "name"].tail(1)
mapping_df = mapping_df.groupby("id")[["id", "name"]].tail(1)
mapping_df = mapping_df.append({"id": 0, "name": "None"}, ignore_index=True)
mapping_df = mapping_df.set_index("id")
mapping_dict = mapping_df["name"].to_dict()
# Get the datetime of the beginning of each iceblock's melting
melting_df = iceblock_df[["datetime", "id", "status"]].copy()
start_df = melting_df[melting_df["status"] == "Melting"].groupby("id")["datetime", "id"].head(1)
start_df = melting_df[melting_df["status"] == "Melting"].groupby("id")[["datetime", "id"]].head(1)
# Get the end of the last iceblock's melting, and set that after that the current melting block is 0/None.
end_df = melting_df[melting_df["status"] == "Done"].groupby("id").head(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment