@@ -8348,7 +8348,7 @@ def abs(self):
8348
8348
8349
8349
def describe (self , percentiles = None , include = None , exclude = None ):
8350
8350
"""
8351
- Generates descriptive statistics that summarize the central tendency,
8351
+ Generate descriptive statistics that summarize the central tendency,
8352
8352
dispersion and shape of a dataset's distribution, excluding
8353
8353
``NaN`` values.
8354
8354
@@ -8392,7 +8392,18 @@ def describe(self, percentiles=None, include=None, exclude=None):
8392
8392
8393
8393
Returns
8394
8394
-------
8395
- summary: Series/DataFrame of summary statistics
8395
+ Series or DataFrame
8396
+ Summary statistics of the Series or Dataframe provided.
8397
+
8398
+ See Also
8399
+ --------
8400
+ DataFrame.count: Count number of non-NA/null observations.
8401
+ DataFrame.max: Maximum of the values in the object.
8402
+ DataFrame.min: Minimum of the values in the object.
8403
+ DataFrame.mean: Mean of the values.
8404
+ DataFrame.std: Standard deviation of the obersvations.
8405
+ DataFrame.select_dtypes: Subset of a DataFrame including/excluding
8406
+ columns based on their dtype.
8396
8407
8397
8408
Notes
8398
8409
-----
@@ -8436,6 +8447,7 @@ def describe(self, percentiles=None, include=None, exclude=None):
8436
8447
50% 2.0
8437
8448
75% 2.5
8438
8449
max 3.0
8450
+ dtype: float64
8439
8451
8440
8452
Describing a categorical ``Series``.
8441
8453
@@ -8466,9 +8478,9 @@ def describe(self, percentiles=None, include=None, exclude=None):
8466
8478
Describing a ``DataFrame``. By default only numeric fields
8467
8479
are returned.
8468
8480
8469
- >>> df = pd.DataFrame({ 'object ': ['a', 'b', 'c'] ,
8470
- ... 'numeric': [1, 2, 3],
8471
- ... 'categorical ': pd.Categorical(['d','e','f'])
8481
+ >>> df = pd.DataFrame({'categorical ': pd.Categorical(['d','e','f']) ,
8482
+ ... 'numeric': [1, 2, 3],
8483
+ ... 'object ': ['a', 'b', 'c']
8472
8484
... })
8473
8485
>>> df.describe()
8474
8486
numeric
@@ -8554,7 +8566,7 @@ def describe(self, percentiles=None, include=None, exclude=None):
8554
8566
Excluding object columns from a ``DataFrame`` description.
8555
8567
8556
8568
>>> df.describe(exclude=[np.object])
8557
- categorical numeric
8569
+ categorical numeric
8558
8570
count 3 3.0
8559
8571
unique 3 NaN
8560
8572
top f NaN
@@ -8566,15 +8578,6 @@ def describe(self, percentiles=None, include=None, exclude=None):
8566
8578
50% NaN 2.0
8567
8579
75% NaN 2.5
8568
8580
max NaN 3.0
8569
-
8570
- See Also
8571
- --------
8572
- DataFrame.count
8573
- DataFrame.max
8574
- DataFrame.min
8575
- DataFrame.mean
8576
- DataFrame.std
8577
- DataFrame.select_dtypes
8578
8581
"""
8579
8582
if self .ndim >= 3 :
8580
8583
msg = "describe is not implemented on Panel objects."
0 commit comments