Skip to content

Commit

Permalink
Drop filename column (to avoid error for the following '.groupby' and…
Browse files Browse the repository at this point in the history
… '.mean()' commands)
  • Loading branch information
valosekj committed Jul 16, 2024
1 parent 56c807e commit c53237e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions baselines/generate_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ def main():
# Concatenate the list of dataframes into a single dataframe
df_concat = pd.concat(list_of_df, ignore_index=True)

# Drop filename column (to avoid error for the following '.groupby' and '.mean()' commands)
df_concat = df_concat.drop(columns=['filename'])

# If a participant_id is duplicated (because the test image is presented across multiple seeds), average the
# metrics across seeds for the same subject.
df_concat = df_concat.groupby(['participant_id', 'session_id', 'site', 'method']).mean().reset_index()
Expand Down

0 comments on commit c53237e

Please sign in to comment.