|
@@ -541,10 +541,11 @@ def final_table_to_clbrdb(df: pd.DataFrame, clbrdb: CalibrdbHandler, runs_df: pd
|
|
|
def save_csv(df: pd.DataFrame, filepath: str, update_current: bool = True):
|
|
|
"""Saves csv file. Updates current file in filepath if exists"""
|
|
|
|
|
|
+ logging.info(f'Saving csv file: len(df)={len(df)}, filepath={filepath}, update_current={update_current}')
|
|
|
if (os.path.isfile(filepath) and update_current):
|
|
|
df_current = pd.read_csv(filepath)
|
|
|
# df_current = df_current.append(df, ignore_index=True)
|
|
|
- df_current = pd.concat([df, df_current], ignore_index=True)
|
|
|
+ df_current = pd.concat([df_current, df], ignore_index=True)
|
|
|
df_current = df_current.drop_duplicates(subset=['energy_point', 'first_run'], keep='last')
|
|
|
df = df_current
|
|
|
|