From 8a877b9dd0cd9f24c4b1516e75434bf51792735a Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Sat, 8 Feb 2025 21:36:52 +0530 Subject: [PATCH] DOC: fix ES01 for pandas.DataFrame.shape --- pandas/core/frame.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 72fc099f57599..57a7b9467a05e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1021,6 +1021,10 @@ def shape(self) -> tuple[int, int]: """ Return a tuple representing the dimensionality of the DataFrame. + Unlike the `len()` method, which only returns the number of rows, `shape` + provides both row and column counts, making it a more informative method for + understanding dataset size. + See Also -------- numpy.ndarray.shape : Tuple of array dimensions.