Skip to content

Commit 776c4b0

Browse files
author
Suraj Mishra
committed
Fix pandas 3.x compatibility in immunolabeling heatmap pipeline
1 parent 17ba154 commit 776c4b0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

EMT_data_analysis/analysis_scripts/Analysis_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,13 +2288,13 @@ def plot_immunolabeling_heatmap(df: pd.DataFrame, figs_dir: str, output_type: st
22882288
df = create_df_IF(df)
22892289

22902290
# Normalize each to time 0 mean intensity (for that condition and round)
2291-
df_normalized = df.groupby(["Label", "Condition"], sort=False).apply(_normalize_to_T0_mean_by_round_and_condiiton).reset_index(drop=True)
2291+
df_normalized = df.groupby(["Label", "Condition"], sort=False, group_keys=False).apply(_normalize_to_T0_mean_by_round_and_condiiton).reset_index(drop=True)
22922292

22932293
# Average all the normalized intensities across the time-point
2294-
df_averaged = df_normalized.groupby(["Label", "Condition"], sort=False).apply(_average_across_time).reset_index(drop=True)
2294+
df_averaged = df_normalized.groupby(["Label", "Condition"], sort=False, group_keys=False).apply(_average_across_time).reset_index(drop=True)
22952295

22962296
# Normalize each to 0-100% for easier comparison across Labels
2297-
df_final = df_averaged.groupby(["Label", "Condition"], sort=False).apply(_normalize_to_100).reset_index(drop=True)
2297+
df_final = df_averaged.groupby(["Label", "Condition"], sort=False, group_keys=False).apply(_normalize_to_100).reset_index(drop=True)
22982298

22992299
# Sorting label and condiiton order
23002300
df_sort = _sort_dataframe(df_final)

0 commit comments

Comments
 (0)