From 2c623cf9b3ffee2896f65c20850752e206ffb3c2 Mon Sep 17 00:00:00 2001 From: Ryan Gibson Date: Thu, 19 Oct 2023 13:23:41 -0400 Subject: [PATCH 1/2] DOC: Correct groupby().mean() usage in table layout getting started article --- .../getting_started/intro_tutorials/07_reshape_table_layout.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst b/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst index 6a0b59b26350c..81a8c3bf66e47 100644 --- a/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst +++ b/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst @@ -266,7 +266,7 @@ For more information about :meth:`~DataFrame.pivot_table`, see the user guide se :: - air_quality.groupby(["parameter", "location"]).mean() + air_quality.groupby(["parameter", "location"]).mean(numeric_only=True) .. raw:: html From d7cf19536bab9c8c6f8bf0bd24ca4c20ba920be1 Mon Sep 17 00:00:00 2001 From: Ryan Gibson Date: Thu, 19 Oct 2023 16:53:02 -0400 Subject: [PATCH 2/2] DOC: Explicitly select column in table layout article's groupby().mean() usage --- .../getting_started/intro_tutorials/07_reshape_table_layout.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst b/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst index 81a8c3bf66e47..e4b34e3af57bf 100644 --- a/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst +++ b/doc/source/getting_started/intro_tutorials/07_reshape_table_layout.rst @@ -266,7 +266,7 @@ For more information about :meth:`~DataFrame.pivot_table`, see the user guide se :: - air_quality.groupby(["parameter", "location"]).mean(numeric_only=True) + air_quality.groupby(["parameter", "location"])[["value"]].mean() .. raw:: html