How will you describe Kannadigas

Generate descriptive statistics that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding values.

Analyzes both numeric and object series, as well as column sets of mixed data types. The output will vary depending on what is provided. Refer to the notes below for more detail.

Parameters:
percentiles:list-like of numbers, optional

The percentiles to include in the output. All should fall between 0 and 1. The default is , which returns the 25th, 50th, and 75th percentiles.

include:‘all’, list-like of dtypes or None (default), optional

A white list of data types to include in the result. Ignored for . Here are the options:

  • ‘all’ : All columns of the input will be included in the output.
  • A list-like of dtypes : Limits the results to the provided data types. To limit the result to numeric types submit . To limit it instead to object columns submit the data type. Strings can also be used in the style of (e.g. ). To select pandas categorical columns, use
  • None (default) : The result will include all numeric columns.
exclude:list-like of dtypes or None (default), optional,

A black list of data types to omit from the result. Ignored for . Here are the options:

  • A list-like of dtypes : Excludes the provided data types from the result. To exclude numeric types submit . To exclude object columns submit the data type . Strings can also be used in the style of (e.g. ). To exclude pandas categorical columns, use
  • None (default) : The result will exclude nothing.
Returns:
Series or DataFrame

Summary statistics of the Series or Dataframe provided.

Notes

For numeric data, the result’s index will include , , , , as well as lower, and upper percentiles. By default the lower percentile is and the upper percentile is . The percentile is the same as the median.

For object data (e.g. strings or timestamps), the result’s index will include , , , and . The is the most common value. The is the most common value’s frequency. Timestamps also include the and items.

If multiple object values have the highest count, then the and results will be arbitrarily chosen from among those with the highest count.

For mixed data types provided via a , the default is to return only an analysis of numeric columns. If the dataframe consists only of object and categorical data without any numeric columns, the default is to return an analysis of both the object and categorical columns. If is provided as an option, the result will include a union of attributes of each type.

The include and exclude parameters can be used to limit which columns in a are analyzed for the output. The parameters are ignored when analyzing a .

Examples

Describing a numeric .

Describing a categorical .

Describing a timestamp .

Describing a . By default only numeric fields are returned.

Describing all columns of a regardless of data type.

Describing a column from a by accessing it as an attribute.

Including only numeric columns in a description.

Including only string columns in a description.

Including only categorical columns from a description.

Excluding numeric columns from a description.

Excluding object columns from a description.

>>> s=pd.Series([1,2,3])>>> s.describe()count 3.0mean 2.0std 1.0min 1.025% 1.550% 2.075% 2.5max 3.0dtype: float64
>>> s=pd.Series(['a','a','b','c'])>>> s.describe()count 4unique 3top afreq 2dtype: object
>>> s=pd.Series([... np.datetime64("2000-01-01"),... np.datetime64("2010-01-01"),... np.datetime64("2010-01-01")... ])>>> s.describe()count 3unique 2top 2010-01-01 00:00:00freq 2first 2000-01-01 00:00:00last 2010-01-01 00:00:00dtype: object
>>> df=pd.DataFrame({'categorical':pd.Categorical(['d','e','f']),... 'numeric':[1,2,3],... 'object':['a','b','c']... })>>> df.describe() numericcount 3.0mean 2.0std 1.0min 1.025% 1.550% 2.075% 2.5max 3.0
>>> df.describe(include='all') categorical numeric objectcount 3 3.0 3unique 3 NaN 3top f NaN cfreq 1 NaN 1mean NaN 2.0 NaNstd NaN 1.0 NaNmin NaN 1.0 NaN25% NaN 1.5 NaN50% NaN 2.0 NaN75% NaN 2.5 NaNmax NaN 3.0 NaN
>>> df.numeric.describe()count 3.0mean 2.0std 1.0min 1.025% 1.550% 2.075% 2.5max 3.0Name: numeric, dtype: float64
>>> df.describe(include=[np.number]) numericcount 3.0mean 2.0std 1.0min 1.025% 1.550% 2.075% 2.5max 3.0
>>> df.describe(include=[np.object]) objectcount 3unique 3top cfreq 1
>>> df.describe(include=['category']) categoricalcount 3unique 3top ffreq 1
>>> df.describe(exclude=[np.number]) categorical objectcount 3 3unique 3 3top f cfreq 1 1
>>> df.describe(exclude=[np.object]) categorical numericcount 3 3.0unique 3 NaNtop f NaNfreq 1 NaNmean NaN 2.0std NaN 1.0min NaN 1.025% NaN 1.550% NaN 2.075% NaN 2.5max NaN 3.0