dask.dataframe.Series.describe#
- Series.describe(split_every=False, percentiles=None, percentiles_method='default', include=None, exclude=None)[source]#
Generate descriptive statistics.
This docstring was copied from pandas.Series.describe.
Some inconsistencies with the Dask version may exist.
Generate descriptive statistics.
Dask computes percentiles (used for the
25%,50%, and75%statistics) using an approximate algorithm by default. Results may therefore differ slightly from pandas. Usepercentiles_method="dask"for the built-in Dask algorithm orpercentiles_method="tdigest"for the t-digest algorithm. Seedask.dataframe.Series.quantile()for details.- Parameters:
- split_everyint or False, optional
Number of partitions to aggregate at once. Defaults to
Falsewhich uses a single-pass reduction over all partitions.- percentileslist-like of numbers, optional
The percentiles to include in the output. All should fall between 0 and 1. By default,
[0.25, 0.5, 0.75]is used.- percentiles_method{“default”, “tdigest”, “dask”}, optional
Method for computing percentiles.
"default"uses the internal Dask algorithm."tdigest"uses the t-digest algorithm for floats and ints and falls back to"dask"otherwise.- Summarize the central tendency, dispersion, and shape of the
- Series’s distribution, excluding ``NaN`` values. The set of
- statistics returned depends on the Series’s dtype; see Notes.
- Returns:
- Series
Summary statistics of the Series.
See also
DataFrame.describeGenerate descriptive statistics of a DataFrame.
Series.countCount of non-NA observations.
Series.maxMaximum of the values.
Series.minMinimum of the values.
Series.meanMean of the values.
Series.stdStandard deviation of the observations.
Notes
For numeric dtypes, the result’s index includes
count,mean,std,min,max, and the requested percentiles. By default the lower percentile is25and the upper is75; the50percentile is the same as the median.For object dtypes (e.g. strings), the result’s index includes
count,unique,top, andfreq. Thetopis the most common value andfreqis its count. If multiple values tie for the highest count,topis chosen arbitrarily from among them.For datetime dtypes, the result also includes
meanand the requested percentiles, computed on the underlying timestamps.Examples
A numeric Series.
>>> s = pd.Series([1, 2, 3]) >>> s.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
An object Series.
>>> s = pd.Series(["a", "a", "b", "c"]) >>> s.describe() count 4 unique 3 top a freq 2 dtype: object
A datetime Series.
>>> s = pd.Series( ... [ ... np.datetime64("2000-01-01"), ... np.datetime64("2010-01-01"), ... np.datetime64("2010-01-01"), ... ] ... ) >>> s.describe() count 3 mean 2006-09-01 08:00:00 min 2000-01-01 00:00:00 25% 2004-12-31 12:00:00 50% 2010-01-01 00:00:00 75% 2010-01-01 00:00:00 max 2010-01-01 00:00:00 dtype: object