Skip to content

Commit 83ce935

Browse files
committed
Fix Pandas >= 2.0.0 change in default GroupBy behaviour.
From Pandas changelog: "Changed default of numeric_only in various DataFrameGroupBy methods; all methods now default to numeric_only=False (GH46072)." See pandas-dev/pandas#46072
1 parent 41e5221 commit 83ce935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PrivateDataset/cluster_deep.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@
998998
"# Save the ametrics on a CSV file\n",
999999
"results.to_csv(\"results/metrics_deepclust.csv\", index=False)\n",
10001000
"\n",
1001-
"results_mean = results.set_index([\"rl_method\",\"clust_method\"]).groupby(level=[0,1]).mean()\n",
1001+
"results_mean = results.set_index([\"rl_method\",\"clust_method\"]).groupby(level=[0,1]).mean(numeric_only=True)\n",
10021002
"results_mean = results_mean.iloc[:,1:]\n",
10031003
"metrics=['same_clust','Acc','ARI','AMI','Sil']\n",
10041004
"results_mean.style.background_gradient(axis=0, cmap=\"cividis\", text_color_threshold=0.3, subset=metrics).format('{:.2f}', subset=metrics)"
@@ -1372,7 +1372,7 @@
13721372
"name": "python",
13731373
"nbconvert_exporter": "python",
13741374
"pygments_lexer": "ipython3",
1375-
"version": "3.8.8"
1375+
"version": "3.11.3"
13761376
},
13771377
"toc-autonumbering": true
13781378
},

0 commit comments

Comments
 (0)