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

Flow. get_flask_content()

parent 5b3fc747
Pipeline #172114 failed with stage
in 1 minute and 16 seconds
......@@ -493,6 +493,27 @@ def add_flask_info(arrival_df: pd.DataFrame, collector_df: pd.DataFrame) -> pd.D
return arrival_df
def get_flask_content(arrival_df: pd.DataFrame) -> pd.DataFrame:
"""Get the content of each flask identified in the input DataFrame
Parameters
----------
arrival_df: pd.DataFrame
Output of :func:`get_arrival_df` function, followed by :func:`add_iceblock_info`, :func:`add_melted_height` and
:func:`add_flask_info` function.
Returns
-------
pd.DataFrame
DataFrame with the iceblock's height range contained in each flask.
"""
flask_df = arrival_df[["flask", "icbk_code", "melted_height_icbk"]].groupby(
["flask", "icbk_code", "icbk_name"]).agg([min, max])
flask_df = flask_df.droplevel(0, axis=1)
flask_df = flask_df.reset_index()
return flask_df
def get_conduct_by_melt_time(arrival_df: pd.DataFrame, conduct_df: pd.DataFrame,
probes: list = ["C1", "C2", "C3", "C4", "C5"],
reference_datetime: str = None,
......
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