MCPcopy Create free account
hub / github.com/dask/dask / describe

Method describe

dask/dataframe/dask_expr/_collection.py:4613–4655  ·  view source on GitHub ↗

Generate descriptive statistics. Dask computes percentiles (used for the ``25%``, ``50%``, and ``75%`` statistics) using an **approximate algorithm** by default. Results may therefore differ slightly from pandas. Use ``percentiles_method="dask"`` for the built-in Da

(
        self,
        split_every=False,
        percentiles=None,
        percentiles_method="default",
        include=None,
        exclude=None,
    )

Source from the content-addressed store, hash-verified

4611
4612 @derived_from(pd.Series)
4613 def describe(
4614 self,
4615 split_every=False,
4616 percentiles=None,
4617 percentiles_method="default",
4618 include=None,
4619 exclude=None,
4620 ):
4621 """Generate descriptive statistics.
4622
4623 Dask computes percentiles (used for the ``25%``, ``50%``, and
4624 ``75%`` statistics) using an **approximate algorithm** by default.
4625 Results may therefore differ slightly from pandas. Use
4626 ``percentiles_method="dask"`` for the built-in Dask algorithm or
4627 ``percentiles_method="tdigest"`` for the t-digest algorithm.
4628 See :meth:`dask.dataframe.Series.quantile` for details.
4629
4630 Parameters
4631 ----------
4632 split_every : int or False, optional
4633 Number of partitions to aggregate at once. Defaults to ``False``
4634 which uses a single-pass reduction over all partitions.
4635 percentiles : list-like of numbers, optional
4636 The percentiles to include in the output. All should fall
4637 between 0 and 1. By default, ``[0.25, 0.5, 0.75]`` is used.
4638 percentiles_method : {"default", "tdigest", "dask"}, optional
4639 Method for computing percentiles. ``"default"`` uses the internal
4640 Dask algorithm. ``"tdigest"`` uses the t-digest algorithm for
4641 floats and ints and falls back to ``"dask"`` otherwise.
4642 """
4643 if (
4644 is_numeric_dtype(self.dtype)
4645 and not is_bool_dtype(self.dtype)
4646 or is_timedelta64_dtype(self.dtype)
4647 or is_datetime64_any_dtype(self.dtype)
4648 ):
4649 return new_collection(
4650 DescribeNumeric(self, split_every, percentiles, percentiles_method)
4651 )
4652 else:
4653 return new_collection(
4654 DescribeNonNumeric(self, split_every, percentiles, percentiles_method)
4655 )
4656
4657 @property
4658 @derived_from(pd.Series)

Callers 10

test_describe_numericFunction · 0.95
_metaMethod · 0.45
describeMethod · 0.45
test_describe_seriesFunction · 0.45
test_describe_dfFunction · 0.45
test_describeFunction · 0.45
test_describe_emptyFunction · 0.45

Calls 3

new_collectionFunction · 0.90
DescribeNumericClass · 0.90
DescribeNonNumericClass · 0.90

Tested by 8

test_describe_numericFunction · 0.76
test_describe_seriesFunction · 0.36
test_describe_dfFunction · 0.36
test_describeFunction · 0.36
test_describe_emptyFunction · 0.36