MCPcopy
hub / github.com/pandas-dev/pandas / describe

Method describe

pandas/core/generic.py:11169–11419  ·  view source on GitHub ↗

Generate descriptive statistics. Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset's distribution, excluding ``NaN`` values. Analyzes both numeric and object series, as well as ``DataFrame``

(
        self,
        percentiles=None,
        include=None,
        exclude=None,
    )

Source from the content-addressed store, hash-verified

11167
11168 @final
11169 def describe(
11170 self,
11171 percentiles=None,
11172 include=None,
11173 exclude=None,
11174 ) -> Self:
11175 """
11176 Generate descriptive statistics.
11177
11178 Descriptive statistics include those that summarize the central
11179 tendency, dispersion and shape of a
11180 dataset's distribution, excluding ``NaN`` values.
11181
11182 Analyzes both numeric and object series, as well
11183 as ``DataFrame`` column sets of mixed data types. The output
11184 will vary depending on what is provided. Refer to the notes
11185 below for more detail.
11186
11187 Parameters
11188 ----------
11189 percentiles : list-like of numbers, optional
11190 The percentiles to include in the output. All should
11191 fall between 0 and 1. The default, ``None``, will automatically
11192 return the 25th, 50th, and 75th percentiles.
11193 include : 'all', list-like of dtypes or None (default), optional
11194 A white list of data types to include in the result. Ignored
11195 for ``Series``. Here are the options:
11196
11197 - 'all' : All columns of the input will be included in the output.
11198 - A list-like of dtypes : Limits the results to the
11199 provided data types.
11200 To limit the result to numeric types submit
11201 ``numpy.number``. To limit it instead to object columns submit
11202 the ``numpy.object`` data type. Strings
11203 can also be used in the style of
11204 ``select_dtypes`` (e.g. ``df.describe(include=['O'])``). To
11205 select pandas categorical columns, use ``'category'``
11206 - None (default) : The result will include all numeric columns.
11207 exclude : list-like of dtypes or None (default), optional,
11208 A black list of data types to omit from the result. Ignored
11209 for ``Series``. Here are the options:
11210
11211 - A list-like of dtypes : Excludes the provided data types
11212 from the result. To exclude numeric types submit
11213 ``numpy.number``. To exclude object columns submit the data
11214 type ``numpy.object``. Strings can also be used in the style of
11215 ``select_dtypes`` (e.g. ``df.describe(exclude=['O'])``). To
11216 exclude pandas categorical columns, use ``'category'``
11217 - None (default) : The result will exclude nothing.
11218
11219 Returns
11220 -------
11221 Series or DataFrame
11222 Summary statistics of the Series or Dataframe provided.
11223
11224 See Also
11225 --------
11226 DataFrame.count: Count number of non-NA/null observations.

Calls 2

describe_ndframeFunction · 0.90
__finalize__Method · 0.80