doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
pandas.CategoricalIndex.as_unordered CategoricalIndex.as_unordered(*args, **kwargs)[source] Set the Categorical to be unordered. Parameters inplace:bool, default False Whether or not to set the ordered attribute in-place or return a copy of this categorical with ordered set to False. Returns Categorical ...
pandas.reference.api.pandas.categoricalindex.as_unordered
pandas.CategoricalIndex.categories propertyCategoricalIndex.categories The categories of this categorical. Setting assigns new values to each category (effectively a rename of each individual category). The assigned value has to be a list-like object. All items must be unique and the number of items in the new cate...
pandas.reference.api.pandas.categoricalindex.categories
pandas.CategoricalIndex.codes propertyCategoricalIndex.codes The category codes of this categorical. Codes are an array of integers which are the positions of the actual values in the categories array. There is no setter, use the other categorical methods and the normal item setter to change values in the categoric...
pandas.reference.api.pandas.categoricalindex.codes
pandas.CategoricalIndex.equals CategoricalIndex.equals(other)[source] Determine if two CategoricalIndex objects contain the same elements. Returns bool If two CategoricalIndex objects have equal elements True, otherwise False.
pandas.reference.api.pandas.categoricalindex.equals
pandas.CategoricalIndex.map CategoricalIndex.map(mapper)[source] Map values using input an input mapping or function. Maps the values (their categories, not the codes) of the index to new categories. If the mapping correspondence is one-to-one the result is a CategoricalIndex which has the same order property as th...
pandas.reference.api.pandas.categoricalindex.map
pandas.CategoricalIndex.ordered propertyCategoricalIndex.ordered Whether the categories have an ordered relationship.
pandas.reference.api.pandas.categoricalindex.ordered
pandas.CategoricalIndex.remove_categories CategoricalIndex.remove_categories(*args, **kwargs)[source] Remove the specified categories. removals must be included in the old categories. Values which were in the removed categories will be set to NaN Parameters removals:category or list of categories The categori...
pandas.reference.api.pandas.categoricalindex.remove_categories
pandas.CategoricalIndex.remove_unused_categories CategoricalIndex.remove_unused_categories(*args, **kwargs)[source] Remove categories which are not used. Parameters inplace:bool, default False Whether or not to drop unused categories inplace or return a copy of this categorical with unused categories dropped....
pandas.reference.api.pandas.categoricalindex.remove_unused_categories
pandas.CategoricalIndex.rename_categories CategoricalIndex.rename_categories(*args, **kwargs)[source] Rename categories. Parameters new_categories:list-like, dict-like or callable New categories which will replace old categories. list-like: all items must be unique and the number of items in the new categori...
pandas.reference.api.pandas.categoricalindex.rename_categories
pandas.CategoricalIndex.reorder_categories CategoricalIndex.reorder_categories(*args, **kwargs)[source] Reorder categories as specified in new_categories. new_categories need to include all old categories and no new category items. Parameters new_categories:Index-like The categories in new order. ordered:bo...
pandas.reference.api.pandas.categoricalindex.reorder_categories
pandas.CategoricalIndex.set_categories CategoricalIndex.set_categories(*args, **kwargs)[source] Set the categories to the specified new_categories. new_categories can include new categories (which will result in unused categories) or remove old categories (which results in values set to NaN). If rename==True, the c...
pandas.reference.api.pandas.categoricalindex.set_categories
pandas.concat pandas.concat(objs, axis=0, join='outer', ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False, sort=False, copy=True)[source] Concatenate pandas objects along a particular axis with optional set logic along the other axes. Can also add a layer of hierarchical indexing on the...
pandas.reference.api.pandas.concat
pandas.core.groupby.DataFrameGroupBy.aggregate DataFrameGroupBy.aggregate(func=None, *args, engine=None, engine_kwargs=None, **kwargs)[source] Aggregate using one or more operations over the specified axis. Parameters func:function, str, list or dict Function to use for aggregating the data. If a function, mu...
pandas.reference.api.pandas.core.groupby.dataframegroupby.aggregate
pandas.core.groupby.DataFrameGroupBy.all DataFrameGroupBy.all(skipna=True)[source] Return True if all values in the group are truthful, else False. Parameters skipna:bool, default True Flag to ignore nan values during truth testing. Returns Series or DataFrame DataFrame or Series of boolean values, wher...
pandas.reference.api.pandas.core.groupby.dataframegroupby.all
pandas.core.groupby.DataFrameGroupBy.any DataFrameGroupBy.any(skipna=True)[source] Return True if any value in the group is truthful, else False. Parameters skipna:bool, default True Flag to ignore nan values during truth testing. Returns Series or DataFrame DataFrame or Series of boolean values, where ...
pandas.reference.api.pandas.core.groupby.dataframegroupby.any
pandas.core.groupby.DataFrameGroupBy.backfill DataFrameGroupBy.backfill(limit=None)[source] Backward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.bfill Backward fill the missing val...
pandas.reference.api.pandas.core.groupby.dataframegroupby.backfill
pandas.core.groupby.DataFrameGroupBy.bfill DataFrameGroupBy.bfill(limit=None)[source] Backward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.bfill Backward fill the missing values in...
pandas.reference.api.pandas.core.groupby.dataframegroupby.bfill
pandas.core.groupby.DataFrameGroupBy.boxplot DataFrameGroupBy.boxplot(subplots=True, column=None, fontsize=None, rot=0, grid=True, ax=None, figsize=None, layout=None, sharex=False, sharey=True, backend=None, **kwargs)[source] Make box plots from DataFrameGroupBy data. Parameters grouped:Grouped DataFrame subp...
pandas.reference.api.pandas.core.groupby.dataframegroupby.boxplot
pandas.core.groupby.DataFrameGroupBy.corr propertyDataFrameGroupBy.corr Compute pairwise correlation of columns, excluding NA/null values. Parameters method:{‘pearson’, ‘kendall’, ‘spearman’} or callable Method of correlation: pearson : standard correlation coefficient kendall : Kendall Tau correlation coeff...
pandas.reference.api.pandas.core.groupby.dataframegroupby.corr
pandas.core.groupby.DataFrameGroupBy.corrwith propertyDataFrameGroupBy.corrwith Compute pairwise correlation. Pairwise correlation is computed between rows or columns of DataFrame with rows or columns of Series or DataFrame. DataFrames are first aligned along both axes before computing the correlations. Parameters...
pandas.reference.api.pandas.core.groupby.dataframegroupby.corrwith
pandas.core.groupby.DataFrameGroupBy.count DataFrameGroupBy.count()[source] Compute count of group, excluding missing values. Returns Series or DataFrame Count of values within each group. See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each r...
pandas.reference.api.pandas.core.groupby.dataframegroupby.count
pandas.core.groupby.DataFrameGroupBy.cov propertyDataFrameGroupBy.cov Compute pairwise covariance of columns, excluding NA/null values. Compute the pairwise covariance among the series of a DataFrame. The returned data frame is the covariance matrix of the columns of the DataFrame. Both NA and null values are autom...
pandas.reference.api.pandas.core.groupby.dataframegroupby.cov
pandas.core.groupby.DataFrameGroupBy.cumcount DataFrameGroupBy.cumcount(ascending=True)[source] Number each item in each group from 0 to the length of that group - 1. Essentially this is equivalent to self.apply(lambda x: pd.Series(np.arange(len(x)), x.index)) Parameters ascending:bool, default True If Fal...
pandas.reference.api.pandas.core.groupby.dataframegroupby.cumcount
pandas.core.groupby.DataFrameGroupBy.cummax DataFrameGroupBy.cummax(axis=0, **kwargs)[source] Cumulative max for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.dataframegroupby.cummax
pandas.core.groupby.DataFrameGroupBy.cummin DataFrameGroupBy.cummin(axis=0, **kwargs)[source] Cumulative min for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.dataframegroupby.cummin
pandas.core.groupby.DataFrameGroupBy.cumprod DataFrameGroupBy.cumprod(axis=0, *args, **kwargs)[source] Cumulative product for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFra...
pandas.reference.api.pandas.core.groupby.dataframegroupby.cumprod
pandas.core.groupby.DataFrameGroupBy.cumsum DataFrameGroupBy.cumsum(axis=0, *args, **kwargs)[source] Cumulative sum for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.dataframegroupby.cumsum
pandas.core.groupby.DataFrameGroupBy.describe DataFrameGroupBy.describe(**kwargs)[source] 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 wel...
pandas.reference.api.pandas.core.groupby.dataframegroupby.describe
pandas.core.groupby.DataFrameGroupBy.diff propertyDataFrameGroupBy.diff First discrete difference of element. Calculates the difference of a Dataframe element compared with another element in the Dataframe (default is element in previous row). Parameters periods:int, default 1 Periods to shift for calculating...
pandas.reference.api.pandas.core.groupby.dataframegroupby.diff
pandas.core.groupby.DataFrameGroupBy.ffill DataFrameGroupBy.ffill(limit=None)[source] Forward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.ffill Returns Series with minimum number o...
pandas.reference.api.pandas.core.groupby.dataframegroupby.ffill
pandas.core.groupby.DataFrameGroupBy.fillna propertyDataFrameGroupBy.fillna Fill NA/NaN values using the specified method. Parameters value:scalar, dict, Series, or DataFrame Value to use to fill holes (e.g. 0), alternately a dict/Series/DataFrame of values specifying which value to use for each index (for a ...
pandas.reference.api.pandas.core.groupby.dataframegroupby.fillna
pandas.core.groupby.DataFrameGroupBy.filter DataFrameGroupBy.filter(func, dropna=True, *args, **kwargs)[source] Return a copy of a DataFrame excluding filtered elements. Elements from groups are filtered if they do not satisfy the boolean criterion specified by func. Parameters func:function Function to apply...
pandas.reference.api.pandas.core.groupby.dataframegroupby.filter
pandas.core.groupby.DataFrameGroupBy.hist propertyDataFrameGroupBy.hist Make a histogram of the DataFrame’s columns. A histogram is a representation of the distribution of data. This function calls matplotlib.pyplot.hist(), on each series in the DataFrame, resulting in one histogram per column. Parameters data:...
pandas.reference.api.pandas.core.groupby.dataframegroupby.hist
pandas.core.groupby.DataFrameGroupBy.idxmax DataFrameGroupBy.idxmax(axis=0, skipna=True)[source] Return index of first occurrence of maximum over requested axis. NA/null values are excluded. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The axis to use. 0 or ‘index’ for row-wise, 1 or ‘columns’ fo...
pandas.reference.api.pandas.core.groupby.dataframegroupby.idxmax
pandas.core.groupby.DataFrameGroupBy.idxmin DataFrameGroupBy.idxmin(axis=0, skipna=True)[source] Return index of first occurrence of minimum over requested axis. NA/null values are excluded. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The axis to use. 0 or ‘index’ for row-wise, 1 or ‘columns’ fo...
pandas.reference.api.pandas.core.groupby.dataframegroupby.idxmin
pandas.core.groupby.DataFrameGroupBy.mad propertyDataFrameGroupBy.mad Return the mean absolute deviation of the values over the requested axis. Parameters axis:{index (0), columns (1)} Axis for the function to be applied on. skipna:bool, default True Exclude NA/null values when computing the result. lev...
pandas.reference.api.pandas.core.groupby.dataframegroupby.mad
pandas.core.groupby.DataFrameGroupBy.nunique DataFrameGroupBy.nunique(dropna=True)[source] Return DataFrame with counts of unique elements in each position. Parameters dropna:bool, default True Don’t include NaN in the counts. Returns nunique: DataFrame Examples >>> df = pd.DataFrame({'id': ['spam', ...
pandas.reference.api.pandas.core.groupby.dataframegroupby.nunique
pandas.core.groupby.DataFrameGroupBy.pad DataFrameGroupBy.pad(limit=None)[source] Forward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.ffill Returns Series with minimum number of ch...
pandas.reference.api.pandas.core.groupby.dataframegroupby.pad
pandas.core.groupby.DataFrameGroupBy.pct_change DataFrameGroupBy.pct_change(periods=1, fill_method='ffill', limit=None, freq=None, axis=0)[source] Calculate pct_change of each value to previous entry in group. Returns Series or DataFrame Percentage changes within each group. See also Series.groupby Apply...
pandas.reference.api.pandas.core.groupby.dataframegroupby.pct_change
pandas.core.groupby.DataFrameGroupBy.plot propertyDataFrameGroupBy.plot Class implementing the .plot attribute for groupby objects.
pandas.reference.api.pandas.core.groupby.dataframegroupby.plot
pandas.core.groupby.DataFrameGroupBy.quantile DataFrameGroupBy.quantile(q=0.5, interpolation='linear')[source] Return group values at the given quantile, a la numpy.percentile. Parameters q:float or array-like, default 0.5 (50% quantile) Value(s) between 0 and 1 providing the quantile(s) to compute. interpo...
pandas.reference.api.pandas.core.groupby.dataframegroupby.quantile
pandas.core.groupby.DataFrameGroupBy.rank DataFrameGroupBy.rank(method='average', ascending=True, na_option='keep', pct=False, axis=0)[source] Provide the rank of values within each group. Parameters method:{‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}, default ‘average’ average: average rank of group. min: lo...
pandas.reference.api.pandas.core.groupby.dataframegroupby.rank
pandas.core.groupby.DataFrameGroupBy.resample DataFrameGroupBy.resample(rule, *args, **kwargs)[source] Provide resampling when using a TimeGrouper. Given a grouper, the function resamples it according to a string “string” -> “frequency”. See the frequency aliases documentation for more details. Parameters rule:...
pandas.reference.api.pandas.core.groupby.dataframegroupby.resample
pandas.core.groupby.DataFrameGroupBy.sample DataFrameGroupBy.sample(n=None, frac=None, replace=False, weights=None, random_state=None)[source] Return a random sample of items from each group. You can use random_state for reproducibility. New in version 1.1.0. Parameters n:int, optional Number of items to re...
pandas.reference.api.pandas.core.groupby.dataframegroupby.sample
pandas.core.groupby.DataFrameGroupBy.shift DataFrameGroupBy.shift(periods=1, freq=None, axis=0, fill_value=None)[source] Shift each group by periods observations. If freq is passed, the index will be increased using the periods and the freq. Parameters periods:int, default 1 Number of periods to shift. freq...
pandas.reference.api.pandas.core.groupby.dataframegroupby.shift
pandas.core.groupby.DataFrameGroupBy.size DataFrameGroupBy.size()[source] Compute group sizes. Returns DataFrame or Series Number of rows in each group as a Series if as_index is True or a DataFrame if as_index is False. See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Ap...
pandas.reference.api.pandas.core.groupby.dataframegroupby.size
pandas.core.groupby.DataFrameGroupBy.skew propertyDataFrameGroupBy.skew Return unbiased skew over requested axis. Normalized by N-1. Parameters axis:{index (0), columns (1)} Axis for the function to be applied on. skipna:bool, default True Exclude NA/null values when computing the result. level:int or l...
pandas.reference.api.pandas.core.groupby.dataframegroupby.skew
pandas.core.groupby.DataFrameGroupBy.take propertyDataFrameGroupBy.take Return the elements in the given positional indices along an axis. This means that we are not indexing according to actual values in the index attribute of the object. We are indexing according to the actual position of the element in the objec...
pandas.reference.api.pandas.core.groupby.dataframegroupby.take
pandas.core.groupby.DataFrameGroupBy.transform DataFrameGroupBy.transform(func, *args, engine=None, engine_kwargs=None, **kwargs)[source] Call function producing a like-indexed DataFrame on each group and return a DataFrame having the same indexes as the original object filled with the transformed values. Paramete...
pandas.reference.api.pandas.core.groupby.dataframegroupby.transform
pandas.core.groupby.DataFrameGroupBy.tshift propertyDataFrameGroupBy.tshift Shift the time index, using the index’s frequency if available. Deprecated since version 1.1.0: Use shift instead. Parameters periods:int Number of periods to move, can be positive or negative. freq:DateOffset, timedelta, or str, ...
pandas.reference.api.pandas.core.groupby.dataframegroupby.tshift
pandas.core.groupby.DataFrameGroupBy.value_counts DataFrameGroupBy.value_counts(subset=None, normalize=False, sort=True, ascending=False, dropna=True)[source] Return a Series or DataFrame containing counts of unique rows. New in version 1.4.0. Parameters subset:list-like, optional Columns to use when counti...
pandas.reference.api.pandas.core.groupby.dataframegroupby.value_counts
pandas.core.groupby.GroupBy.__iter__ GroupBy.__iter__()[source] Groupby iterator. Returns Generator yielding sequence of (name, subsetted object) for each group
pandas.reference.api.pandas.core.groupby.groupby.__iter__
pandas.core.groupby.GroupBy.agg GroupBy.agg(func, *args, **kwargs)[source]
pandas.reference.api.pandas.core.groupby.groupby.agg
pandas.core.groupby.GroupBy.all finalGroupBy.all(skipna=True)[source] Return True if all values in the group are truthful, else False. Parameters skipna:bool, default True Flag to ignore nan values during truth testing. Returns Series or DataFrame DataFrame or Series of boolean values, where a value is ...
pandas.reference.api.pandas.core.groupby.groupby.all
pandas.core.groupby.GroupBy.any finalGroupBy.any(skipna=True)[source] Return True if any value in the group is truthful, else False. Parameters skipna:bool, default True Flag to ignore nan values during truth testing. Returns Series or DataFrame DataFrame or Series of boolean values, where a value is Tr...
pandas.reference.api.pandas.core.groupby.groupby.any
pandas.core.groupby.GroupBy.apply GroupBy.apply(func, *args, **kwargs)[source] Apply function func group-wise and combine the results together. The function passed to apply must take a dataframe as its first argument and return a DataFrame, Series or scalar. apply will then take care of combining the results back t...
pandas.reference.api.pandas.core.groupby.groupby.apply
pandas.core.groupby.GroupBy.backfill GroupBy.backfill(limit=None)[source] Backward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.bfill Backward fill the missing values in the dataset...
pandas.reference.api.pandas.core.groupby.groupby.backfill
pandas.core.groupby.GroupBy.bfill finalGroupBy.bfill(limit=None)[source] Backward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.bfill Backward fill the missing values in the dataset....
pandas.reference.api.pandas.core.groupby.groupby.bfill
pandas.core.groupby.GroupBy.count finalGroupBy.count()[source] Compute count of group, excluding missing values. Returns Series or DataFrame Count of values within each group. See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column ...
pandas.reference.api.pandas.core.groupby.groupby.count
pandas.core.groupby.GroupBy.cumcount finalGroupBy.cumcount(ascending=True)[source] Number each item in each group from 0 to the length of that group - 1. Essentially this is equivalent to self.apply(lambda x: pd.Series(np.arange(len(x)), x.index)) Parameters ascending:bool, default True If False, number in...
pandas.reference.api.pandas.core.groupby.groupby.cumcount
pandas.core.groupby.GroupBy.cummax finalGroupBy.cummax(axis=0, **kwargs)[source] Cumulative max for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.groupby.cummax
pandas.core.groupby.GroupBy.cummin finalGroupBy.cummin(axis=0, **kwargs)[source] Cumulative min for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.groupby.cummin
pandas.core.groupby.GroupBy.cumprod finalGroupBy.cumprod(axis=0, *args, **kwargs)[source] Cumulative product for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.groupby.cumprod
pandas.core.groupby.GroupBy.cumsum finalGroupBy.cumsum(axis=0, *args, **kwargs)[source] Cumulative sum for each group. Returns Series or DataFrame See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a function groupby to each row or column of a DataFrame.
pandas.reference.api.pandas.core.groupby.groupby.cumsum
pandas.core.groupby.GroupBy.ffill finalGroupBy.ffill(limit=None)[source] Forward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.ffill Returns Series with minimum number of char in obj...
pandas.reference.api.pandas.core.groupby.groupby.ffill
pandas.core.groupby.GroupBy.first finalGroupBy.first(numeric_only=False, min_count=- 1)[source] Compute first of group values. Parameters numeric_only:bool, default False Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, default -1 ...
pandas.reference.api.pandas.core.groupby.groupby.first
pandas.core.groupby.GroupBy.get_group GroupBy.get_group(name, obj=None)[source] Construct DataFrame from group with provided name. Parameters name:object The name of the group to get as a DataFrame. obj:DataFrame, default None The DataFrame to take the DataFrame out of. If it is None, the object groupby w...
pandas.reference.api.pandas.core.groupby.groupby.get_group
pandas.core.groupby.GroupBy.groups propertyGroupBy.groups Dict {group name -> group labels}.
pandas.reference.api.pandas.core.groupby.groupby.groups
pandas.core.groupby.GroupBy.head finalGroupBy.head(n=5)[source] Return first n rows of each group. Similar to .apply(lambda x: x.head(n)), but it returns a subset of rows from the original DataFrame with original index and order preserved (as_index flag is ignored). Parameters n:int If positive: number of ent...
pandas.reference.api.pandas.core.groupby.groupby.head
pandas.core.groupby.GroupBy.indices propertyGroupBy.indices Dict {group name -> group indices}.
pandas.reference.api.pandas.core.groupby.groupby.indices
pandas.core.groupby.GroupBy.last finalGroupBy.last(numeric_only=False, min_count=- 1)[source] Compute last of group values. Parameters numeric_only:bool, default False Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, default -1 T...
pandas.reference.api.pandas.core.groupby.groupby.last
pandas.core.groupby.GroupBy.max finalGroupBy.max(numeric_only=False, min_count=- 1)[source] Compute max of group values. Parameters numeric_only:bool, default False Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, default -1 The ...
pandas.reference.api.pandas.core.groupby.groupby.max
pandas.core.groupby.GroupBy.mean finalGroupBy.mean(numeric_only=NoDefault.no_default, engine='cython', engine_kwargs=None)[source] Compute mean of groups, excluding missing values. Parameters numeric_only:bool, default True Include only float, int, boolean columns. If None, will attempt to use everything, the...
pandas.reference.api.pandas.core.groupby.groupby.mean
pandas.core.groupby.GroupBy.median finalGroupBy.median(numeric_only=NoDefault.no_default)[source] Compute median of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex Parameters numeric_only:bool, default True Include only float, int, boolean columns. If None, will...
pandas.reference.api.pandas.core.groupby.groupby.median
pandas.core.groupby.GroupBy.min finalGroupBy.min(numeric_only=False, min_count=- 1)[source] Compute min of group values. Parameters numeric_only:bool, default False Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, default -1 The ...
pandas.reference.api.pandas.core.groupby.groupby.min
pandas.core.groupby.GroupBy.ngroup finalGroupBy.ngroup(ascending=True)[source] Number each group from 0 to the number of groups - 1. This is the enumerative complement of cumcount. Note that the numbers given to the groups match the order in which the groups would be seen when iterating over the groupby object, not...
pandas.reference.api.pandas.core.groupby.groupby.ngroup
pandas.core.groupby.GroupBy.nth finalGroupBy.nth(n, dropna=None)[source] Take the nth row from each group if n is an int, otherwise a subset of rows. Can be either a call or an index. dropna is not available with index notation. Index notation accepts a comma separated list of integers and slices. If dropna, will t...
pandas.reference.api.pandas.core.groupby.groupby.nth
pandas.core.groupby.GroupBy.ohlc finalGroupBy.ohlc()[source] Compute open, high, low and close values of a group, excluding missing values. For multiple groupings, the result index will be a MultiIndex Returns DataFrame Open, high, low and close values within each group. See also Series.groupby Apply a f...
pandas.reference.api.pandas.core.groupby.groupby.ohlc
pandas.core.groupby.GroupBy.pad GroupBy.pad(limit=None)[source] Forward fill the values. Parameters limit:int, optional Limit of how many values to fill. Returns Series or DataFrame Object with missing values filled. See also Series.ffill Returns Series with minimum number of char in object. Dat...
pandas.reference.api.pandas.core.groupby.groupby.pad
pandas.core.groupby.GroupBy.pct_change finalGroupBy.pct_change(periods=1, fill_method='ffill', limit=None, freq=None, axis=0)[source] Calculate pct_change of each value to previous entry in group. Returns Series or DataFrame Percentage changes within each group. See also Series.groupby Apply a function g...
pandas.reference.api.pandas.core.groupby.groupby.pct_change
pandas.core.groupby.GroupBy.pipe GroupBy.pipe(func, *args, **kwargs)[source] Apply a function func with arguments to this GroupBy object and return the function’s result. Use .pipe when you want to improve readability by chaining together functions that expect Series, DataFrames, GroupBy or Resampler objects. Inste...
pandas.reference.api.pandas.core.groupby.groupby.pipe
pandas.core.groupby.GroupBy.prod finalGroupBy.prod(numeric_only=NoDefault.no_default, min_count=0)[source] Compute prod of group values. Parameters numeric_only:bool, default True Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. min_count:int, de...
pandas.reference.api.pandas.core.groupby.groupby.prod
pandas.core.groupby.GroupBy.rank finalGroupBy.rank(method='average', ascending=True, na_option='keep', pct=False, axis=0)[source] Provide the rank of values within each group. Parameters method:{‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}, default ‘average’ average: average rank of group. min: lowest rank in ...
pandas.reference.api.pandas.core.groupby.groupby.rank
pandas.core.groupby.GroupBy.sem finalGroupBy.sem(ddof=1)[source] Compute standard error of the mean of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex. Parameters ddof:int, default 1 Degrees of freedom. Returns Series or DataFrame Standard error of the mea...
pandas.reference.api.pandas.core.groupby.groupby.sem
pandas.core.groupby.GroupBy.size finalGroupBy.size()[source] Compute group sizes. Returns DataFrame or Series Number of rows in each group as a Series if as_index is True or a DataFrame if as_index is False. See also Series.groupby Apply a function groupby to a Series. DataFrame.groupby Apply a functio...
pandas.reference.api.pandas.core.groupby.groupby.size
pandas.core.groupby.GroupBy.std finalGroupBy.std(ddof=1, engine=None, engine_kwargs=None)[source] Compute standard deviation of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex. Parameters ddof:int, default 1 Degrees of freedom. engine:str, default None 'cyt...
pandas.reference.api.pandas.core.groupby.groupby.std
pandas.core.groupby.GroupBy.sum finalGroupBy.sum(numeric_only=NoDefault.no_default, min_count=0, engine=None, engine_kwargs=None)[source] Compute sum of group values. Parameters numeric_only:bool, default True Include only float, int, boolean columns. If None, will attempt to use everything, then use only num...
pandas.reference.api.pandas.core.groupby.groupby.sum
pandas.core.groupby.GroupBy.tail finalGroupBy.tail(n=5)[source] Return last n rows of each group. Similar to .apply(lambda x: x.tail(n)), but it returns a subset of rows from the original DataFrame with original index and order preserved (as_index flag is ignored). Parameters n:int If positive: number of entr...
pandas.reference.api.pandas.core.groupby.groupby.tail
pandas.core.groupby.GroupBy.var finalGroupBy.var(ddof=1, engine=None, engine_kwargs=None)[source] Compute variance of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex. Parameters ddof:int, default 1 Degrees of freedom. engine:str, default None 'cython' : Run...
pandas.reference.api.pandas.core.groupby.groupby.var
pandas.core.groupby.SeriesGroupBy.aggregate SeriesGroupBy.aggregate(func=None, *args, engine=None, engine_kwargs=None, **kwargs)[source] Aggregate using one or more operations over the specified axis. Parameters func:function, str, list or dict Function to use for aggregating the data. If a function, must eit...
pandas.reference.api.pandas.core.groupby.seriesgroupby.aggregate
pandas.core.groupby.SeriesGroupBy.hist propertySeriesGroupBy.hist Draw histogram of the input series using matplotlib. Parameters by:object, optional If passed, then used to form histograms for separate groups. ax:matplotlib axis object If not passed, uses gca(). grid:bool, default True Whether to sho...
pandas.reference.api.pandas.core.groupby.seriesgroupby.hist
pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing propertySeriesGroupBy.is_monotonic_decreasing Return boolean if values in the object are monotonic_decreasing. Returns bool
pandas.reference.api.pandas.core.groupby.seriesgroupby.is_monotonic_decreasing
pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing propertySeriesGroupBy.is_monotonic_increasing Alias for is_monotonic.
pandas.reference.api.pandas.core.groupby.seriesgroupby.is_monotonic_increasing
pandas.core.groupby.SeriesGroupBy.nlargest SeriesGroupBy.nlargest(n=5, keep='first')[source] Return the largest n elements. Parameters n:int, default 5 Return this many descending sorted values. keep:{‘first’, ‘last’, ‘all’}, default ‘first’ When there are duplicate values that cannot all fit in a Series ...
pandas.reference.api.pandas.core.groupby.seriesgroupby.nlargest
pandas.core.groupby.SeriesGroupBy.nsmallest SeriesGroupBy.nsmallest(n=5, keep='first')[source] Return the smallest n elements. Parameters n:int, default 5 Return this many ascending sorted values. keep:{‘first’, ‘last’, ‘all’}, default ‘first’ When there are duplicate values that cannot all fit in a Serie...
pandas.reference.api.pandas.core.groupby.seriesgroupby.nsmallest
pandas.core.groupby.SeriesGroupBy.nunique SeriesGroupBy.nunique(dropna=True)[source] Return number of unique elements in the group. Returns Series Number of unique values within each group.
pandas.reference.api.pandas.core.groupby.seriesgroupby.nunique
pandas.core.groupby.SeriesGroupBy.transform SeriesGroupBy.transform(func, *args, engine=None, engine_kwargs=None, **kwargs)[source] Call function producing a like-indexed Series on each group and return a Series having the same indexes as the original object filled with the transformed values. Parameters f:func...
pandas.reference.api.pandas.core.groupby.seriesgroupby.transform
pandas.core.groupby.SeriesGroupBy.unique propertySeriesGroupBy.unique Return unique values of Series object. Uniques are returned in order of appearance. Hash table-based unique, therefore does NOT sort. Returns ndarray or ExtensionArray The unique values returned as a NumPy array. See Notes. See also uni...
pandas.reference.api.pandas.core.groupby.seriesgroupby.unique
pandas.core.groupby.SeriesGroupBy.value_counts SeriesGroupBy.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True)[source]
pandas.reference.api.pandas.core.groupby.seriesgroupby.value_counts
pandas.core.resample.Resampler.__iter__ Resampler.__iter__()[source] Groupby iterator. Returns Generator yielding sequence of (name, subsetted object) for each group
pandas.reference.api.pandas.core.resample.resampler.__iter__