From 613edef04f918f9437751080495e8c51039ac1a3 Mon Sep 17 00:00:00 2001 From: Chris Halbert Date: Mon, 11 Nov 2024 08:51:46 -0500 Subject: [PATCH] Set numeric_only = true for corr() function. --- python/pandas_exploratory_data_analysis.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pandas_exploratory_data_analysis.ipynb b/python/pandas_exploratory_data_analysis.ipynb index e44ee9b..59b2f39 100644 --- a/python/pandas_exploratory_data_analysis.ipynb +++ b/python/pandas_exploratory_data_analysis.ipynb @@ -29866,7 +29866,7 @@ } }, "source": [ - "corr = df.corr()\n", + "corr = df.corr(numeric_only=True)\n", "corr" ], "execution_count": 0, @@ -31800,4 +31800,4 @@ "outputs": [] } ] -} \ No newline at end of file +}