modin.pandas.Series.describe¶
- Series.describe(percentiles=None, include=None, exclude=None)[source]¶
Generate descriptive statistics.
For non-numeric datasets, computes count (# of non-null items), unique (# of unique items), top (the mode; the element at the lowest position if multiple), and freq (# of times the mode appears).
For numeric datasets, computes count (# of non-null items), mean, std, min, the specified percentiles, and max.
- Parameters:
percentiles (Optional[ListLike], default None) – The percentiles to compute for numeric columns. If unspecified, defaults to [0.25, 0.5, 0.75], which returns the 25th, 50th, and 75th percentiles. All values should fall between 0 and 1. The median (0.5) will always be added to the displayed percentile if not already included; the min and max are always displayed in addition to the percentiles.
include (Optional[List[str, ExtensionDtype | np.dtype]] | "all", default None) – Ignored for Series.
exclude (Optional[List[str, ExtensionDtype | np.dtype]], default None) – Ignored for Series.
- Returns:
A series containing statistics for the dataset.
- Return type:
Examples
Describing numeric data:
>>> pd.Series([1, 2, 3]).describe() count 3.0 mean 2.0 std 1.0 min 1.0 25% 1.5 50% 2.0 75% 2.5 max 3.0 dtype: float64
Describing non-numeric data:
>>> pd.Series(['a', 'b', 'c']).describe() count 3 unique 3 top a freq 1 dtype: object