From 330aa5a577e42df34e4a1bcafb7c6df4252227f2 Mon Sep 17 00:00:00 2001 From: yangjun42 Date: Thu, 17 Apr 2025 11:30:01 +0300 Subject: [PATCH] fix the bug of fillna example --- chapter_preliminaries/pandas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter_preliminaries/pandas.md b/chapter_preliminaries/pandas.md index 49e006295..9884437f4 100644 --- a/chapter_preliminaries/pandas.md +++ b/chapter_preliminaries/pandas.md @@ -55,7 +55,7 @@ print(data) ```{.python .input} #@tab all inputs, outputs = data.iloc[:, 0:2], data.iloc[:, 2] -inputs = inputs.fillna(inputs.mean()) +inputs = inputs.fillna(inputs.mean(numeric_only=True)) print(inputs) ```