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

Iceblock processor. Get total stacked height

parent 503488ea
......@@ -71,3 +71,13 @@ def get_clean_iceblock_df(iceblock_df: pd.DataFrame) -> pd.DataFrame:
clean_iceblock_df = pd.merge(clean_iceblock_df, first_df, on="id", how="outer")
return clean_iceblock_df
def get_total_stacked_height(clean_iceblock_df: pd.DataFrame) -> pd.DataFrame:
sum_df = clean_iceblock_df.groupby("stack_id")[["initial_height"]].sum()
sum_df = sum_df.rename(columns={"initial_height": "tot_stacked_height"})
datetime_df = clean_iceblock_df.groupby("stack_id")["datetime_stacked"].max()
total_stacked_height_df = pd.merge(sum_df, datetime_df, left_index=True, right_index=True)
total_stacked_height_df = total_stacked_height_df.reset_index()
return total_stacked_height_df
# Absolute path of the base directory where the data files produced by the CFA are be stored.
base_data_path = /homel/ojossoud/_temp/data_cfa
base_data_path = /homel/ojossoud/Data/data_cfa
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