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,
)
| 3654 | return result |
| 3655 | |
| 3656 | def describe( |
| 3657 | self, |
| 3658 | percentiles=None, |
| 3659 | include=None, |
| 3660 | exclude=None, |
| 3661 | ) -> NDFrameT: |
| 3662 | """ |
| 3663 | Generate descriptive statistics. |
| 3664 | |
| 3665 | Descriptive statistics include those that summarize the central |
| 3666 | tendency, dispersion and shape of a |
| 3667 | dataset's distribution, excluding ``NaN`` values. |
| 3668 | |
| 3669 | Analyzes both numeric and object series, as well |
| 3670 | as ``DataFrame`` column sets of mixed data types. The output |
| 3671 | will vary depending on what is provided. Refer to the notes |
| 3672 | below for more detail. |
| 3673 | |
| 3674 | Parameters |
| 3675 | ---------- |
| 3676 | percentiles : list-like of numbers, optional |
| 3677 | The percentiles to include in the output. All should |
| 3678 | fall between 0 and 1. The default, ``None``, will automatically |
| 3679 | return the 25th, 50th, and 75th percentiles. |
| 3680 | include : 'all', list-like of dtypes or None (default), optional |
| 3681 | A white list of data types to include in the result. Ignored |
| 3682 | for ``Series``. Here are the options: |
| 3683 | |
| 3684 | - 'all' : All columns of the input will be included in the output. |
| 3685 | - A list-like of dtypes : Limits the results to the |
| 3686 | provided data types. |
| 3687 | To limit the result to numeric types submit |
| 3688 | ``numpy.number``. To limit it instead to object columns submit |
| 3689 | the ``numpy.object`` data type. Strings |
| 3690 | can also be used in the style of |
| 3691 | ``select_dtypes`` (e.g. ``df.describe(include=['O'])``). To |
| 3692 | select pandas categorical columns, use ``'category'`` |
| 3693 | - None (default) : The result will include all numeric columns. |
| 3694 | exclude : list-like of dtypes or None (default), optional, |
| 3695 | A black list of data types to omit from the result. Ignored |
| 3696 | for ``Series``. Here are the options: |
| 3697 | |
| 3698 | - A list-like of dtypes : Excludes the provided data types |
| 3699 | from the result. To exclude numeric types submit |
| 3700 | ``numpy.number``. To exclude object columns submit the data |
| 3701 | type ``numpy.object``. Strings can also be used in the style of |
| 3702 | ``select_dtypes`` (e.g. ``df.describe(exclude=['O'])``). To |
| 3703 | exclude pandas categorical columns, use ``'category'`` |
| 3704 | - None (default) : The result will exclude nothing. |
| 3705 | |
| 3706 | Returns |
| 3707 | ------- |
| 3708 | Series or DataFrame |
| 3709 | Summary statistics of the Series or Dataframe provided. |
| 3710 | |
| 3711 | See Also |
| 3712 | -------- |
| 3713 | DataFrame.count: Count number of non-NA/null observations. |
nothing calls this directly
no test coverage detected