doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
pandas.DataFrame.between_time DataFrame.between_time(start_time, end_time, include_start=NoDefault.no_default, include_end=NoDefault.no_default, inclusive=None, axis=None)[source] Select values between particular times of the day (e.g., 9:00-9:30 AM). By setting start_time to be later than end_time, you can get the...
pandas.reference.api.pandas.dataframe.between_time
pandas.DataFrame.bfill DataFrame.bfill(axis=None, inplace=False, limit=None, downcast=None)[source] Synonym for DataFrame.fillna() with method='bfill'. Returns Series/DataFrame or None Object with missing values filled or None if inplace=True.
pandas.reference.api.pandas.dataframe.bfill
pandas.DataFrame.bool DataFrame.bool()[source] Return the bool of a single element Series or DataFrame. This must be a boolean scalar value, either True or False. It will raise a ValueError if the Series or DataFrame does not have exactly 1 element, or that element is not boolean (integer values 0 and 1 will also r...
pandas.reference.api.pandas.dataframe.bool
pandas.DataFrame.boxplot DataFrame.boxplot(column=None, by=None, ax=None, fontsize=None, rot=0, grid=True, figsize=None, layout=None, return_type=None, backend=None, **kwargs)[source] Make a box plot from DataFrame columns. Make a box-and-whisker plot from DataFrame columns, optionally grouped by some other columns...
pandas.reference.api.pandas.dataframe.boxplot
pandas.DataFrame.clip DataFrame.clip(lower=None, upper=None, axis=None, inplace=False, *args, **kwargs)[source] Trim values at input threshold(s). Assigns values outside boundary to boundary values. Thresholds can be singular values or array like, and in the latter case the clipping is performed element-wise in the...
pandas.reference.api.pandas.dataframe.clip
pandas.DataFrame.columns DataFrame.columns The column labels of the DataFrame.
pandas.reference.api.pandas.dataframe.columns
pandas.DataFrame.combine DataFrame.combine(other, func, fill_value=None, overwrite=True)[source] Perform column-wise combine with another DataFrame. Combines a DataFrame with other DataFrame using func to element-wise combine columns. The row and column indexes of the resulting DataFrame will be the union of the tw...
pandas.reference.api.pandas.dataframe.combine
pandas.DataFrame.combine_first DataFrame.combine_first(other)[source] Update null elements with value in the same location in other. Combine two DataFrame objects by filling null values in one DataFrame with non-null values from other DataFrame. The row and column indexes of the resulting DataFrame will be the unio...
pandas.reference.api.pandas.dataframe.combine_first
pandas.DataFrame.compare DataFrame.compare(other, align_axis=1, keep_shape=False, keep_equal=False)[source] Compare to another DataFrame and show the differences. New in version 1.1.0. Parameters other:DataFrame Object to compare with. align_axis:{0 or ‘index’, 1 or ‘columns’}, default 1 Determine which...
pandas.reference.api.pandas.dataframe.compare
pandas.DataFrame.convert_dtypes DataFrame.convert_dtypes(infer_objects=True, convert_string=True, convert_integer=True, convert_boolean=True, convert_floating=True)[source] Convert columns to best possible dtypes using dtypes supporting pd.NA. New in version 1.0.0. Parameters infer_objects:bool, default True ...
pandas.reference.api.pandas.dataframe.convert_dtypes
pandas.DataFrame.copy DataFrame.copy(deep=True)[source] Make a copy of this object’s indices and data. When deep=True (default), a new object will be created with a copy of the calling object’s data and indices. Modifications to the data or indices of the copy will not be reflected in the original object (see notes...
pandas.reference.api.pandas.dataframe.copy
pandas.DataFrame.corr DataFrame.corr(method='pearson', min_periods=1)[source] 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...
pandas.reference.api.pandas.dataframe.corr
pandas.DataFrame.corrwith DataFrame.corrwith(other, axis=0, drop=False, method='pearson')[source] 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 correla...
pandas.reference.api.pandas.dataframe.corrwith
pandas.DataFrame.count DataFrame.count(axis=0, level=None, numeric_only=False)[source] Count non-NA cells for each column or row. The values None, NaN, NaT, and optionally numpy.inf (depending on pandas.options.mode.use_inf_as_na) are considered NA. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 If...
pandas.reference.api.pandas.dataframe.count
pandas.DataFrame.cov DataFrame.cov(min_periods=None, ddof=1)[source] 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 automa...
pandas.reference.api.pandas.dataframe.cov
pandas.DataFrame.cummax DataFrame.cummax(axis=None, skipna=True, *args, **kwargs)[source] Return cumulative maximum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative maximum. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The index or the name...
pandas.reference.api.pandas.dataframe.cummax
pandas.DataFrame.cummin DataFrame.cummin(axis=None, skipna=True, *args, **kwargs)[source] Return cumulative minimum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative minimum. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The index or the name...
pandas.reference.api.pandas.dataframe.cummin
pandas.DataFrame.cumprod DataFrame.cumprod(axis=None, skipna=True, *args, **kwargs)[source] Return cumulative product over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative product. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The index or the na...
pandas.reference.api.pandas.dataframe.cumprod
pandas.DataFrame.cumsum DataFrame.cumsum(axis=None, skipna=True, *args, **kwargs)[source] Return cumulative sum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative sum. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The index or the name of the ...
pandas.reference.api.pandas.dataframe.cumsum
pandas.DataFrame.describe DataFrame.describe(percentiles=None, include=None, exclude=None, datetime_is_numeric=False)[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 bo...
pandas.reference.api.pandas.dataframe.describe
pandas.DataFrame.diff DataFrame.diff(periods=1, axis=0)[source] 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 differe...
pandas.reference.api.pandas.dataframe.diff
pandas.DataFrame.div DataFrame.div(other, axis='columns', level=None, fill_value=None)[source] Get Floating division of dataframe and other, element-wise (binary operator truediv). Equivalent to dataframe / other, but with support to substitute a fill_value for missing data in one of the inputs. With reverse versio...
pandas.reference.api.pandas.dataframe.div
pandas.DataFrame.divide DataFrame.divide(other, axis='columns', level=None, fill_value=None)[source] Get Floating division of dataframe and other, element-wise (binary operator truediv). Equivalent to dataframe / other, but with support to substitute a fill_value for missing data in one of the inputs. With reverse ...
pandas.reference.api.pandas.dataframe.divide
pandas.DataFrame.dot DataFrame.dot(other)[source] Compute the matrix multiplication between the DataFrame and other. This method computes the matrix product between the DataFrame and the values of an other Series, DataFrame or a numpy array. It can also be called using self @ other in Python >= 3.5. Parameters ...
pandas.reference.api.pandas.dataframe.dot
pandas.DataFrame.drop DataFrame.drop(labels=None, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise')[source] Drop specified labels from rows or columns. Remove rows or columns by specifying label names and corresponding axis, or by specifying directly index or column names. When using a mu...
pandas.reference.api.pandas.dataframe.drop
pandas.DataFrame.drop_duplicates DataFrame.drop_duplicates(subset=None, keep='first', inplace=False, ignore_index=False)[source] Return DataFrame with duplicate rows removed. Considering certain columns is optional. Indexes, including time indexes are ignored. Parameters subset:column label or sequence of label...
pandas.reference.api.pandas.dataframe.drop_duplicates
pandas.DataFrame.droplevel DataFrame.droplevel(level, axis=0)[source] Return Series/DataFrame with requested index / column level(s) removed. Parameters level:int, str, or list-like If a string is given, must be the name of a level If list-like, elements must be names or positional indexes of levels. axis:{...
pandas.reference.api.pandas.dataframe.droplevel
pandas.DataFrame.dropna DataFrame.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)[source] Remove missing values. See the User Guide for more on which values are considered missing, and how to work with missing data. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 Determine if rows...
pandas.reference.api.pandas.dataframe.dropna
pandas.DataFrame.dtypes propertyDataFrame.dtypes Return the dtypes in the DataFrame. This returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns. Columns with mixed types are stored with the object dtype. See the User Guide for more. Returns pandas.Series The ...
pandas.reference.api.pandas.dataframe.dtypes
pandas.DataFrame.duplicated DataFrame.duplicated(subset=None, keep='first')[source] Return boolean Series denoting duplicate rows. Considering certain columns is optional. Parameters subset:column label or sequence of labels, optional Only consider certain columns for identifying duplicates, by default use al...
pandas.reference.api.pandas.dataframe.duplicated
pandas.DataFrame.empty propertyDataFrame.empty Indicator whether Series/DataFrame is empty. True if Series/DataFrame is entirely empty (no items), meaning any of the axes are of length 0. Returns bool If Series/DataFrame is empty, return True, if not return False. See also Series.dropna Return series wit...
pandas.reference.api.pandas.dataframe.empty
pandas.DataFrame.eq DataFrame.eq(other, axis='columns', level=None)[source] Get Equal to of dataframe and other, element-wise (binary operator eq). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or columns) and level for...
pandas.reference.api.pandas.dataframe.eq
pandas.DataFrame.equals DataFrame.equals(other)[source] Test whether two objects contain the same elements. This function allows two Series or DataFrames to be compared against each other to see if they have the same shape and elements. NaNs in the same location are considered equal. The row/column index do not nee...
pandas.reference.api.pandas.dataframe.equals
pandas.DataFrame.eval DataFrame.eval(expr, inplace=False, **kwargs)[source] Evaluate a string describing operations on DataFrame columns. Operates on columns only, not specific rows or elements. This allows eval to run arbitrary code, which can make you vulnerable to code injection if you pass user input to this fu...
pandas.reference.api.pandas.dataframe.eval
pandas.DataFrame.ewm DataFrame.ewm(com=None, span=None, halflife=None, alpha=None, min_periods=0, adjust=True, ignore_na=False, axis=0, times=None, method='single')[source] Provide exponentially weighted (EW) calculations. Exactly one parameter: com, span, halflife, or alpha must be provided. Parameters com:flo...
pandas.reference.api.pandas.dataframe.ewm
pandas.DataFrame.expanding DataFrame.expanding(min_periods=1, center=None, axis=0, method='single')[source] Provide expanding window calculations. Parameters min_periods:int, default 1 Minimum number of observations in window required to have a value; otherwise, result is np.nan. center:bool, default False ...
pandas.reference.api.pandas.dataframe.expanding
pandas.DataFrame.explode DataFrame.explode(column, ignore_index=False)[source] Transform each element of a list-like to a row, replicating index values. New in version 0.25.0. Parameters column:IndexLabel Column(s) to explode. For multiple columns, specify a non-empty list with each element be str or tuple,...
pandas.reference.api.pandas.dataframe.explode
pandas.DataFrame.ffill DataFrame.ffill(axis=None, inplace=False, limit=None, downcast=None)[source] Synonym for DataFrame.fillna() with method='ffill'. Returns Series/DataFrame or None Object with missing values filled or None if inplace=True.
pandas.reference.api.pandas.dataframe.ffill
pandas.DataFrame.fillna DataFrame.fillna(value=None, method=None, axis=None, inplace=False, limit=None, downcast=None)[source] 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 s...
pandas.reference.api.pandas.dataframe.fillna
pandas.DataFrame.filter DataFrame.filter(items=None, like=None, regex=None, axis=None)[source] Subset the dataframe rows or columns according to the specified index labels. Note that this routine does not filter a dataframe on its contents. The filter is applied to the labels of the index. Parameters items:list...
pandas.reference.api.pandas.dataframe.filter
pandas.DataFrame.first DataFrame.first(offset)[source] Select initial periods of time series data based on a date offset. When having a DataFrame with dates as index, this function can select the first few rows based on a date offset. Parameters offset:str, DateOffset or dateutil.relativedelta The offset leng...
pandas.reference.api.pandas.dataframe.first
pandas.DataFrame.first_valid_index DataFrame.first_valid_index()[source] Return index for first non-NA value or None, if no NA value is found. Returns scalar:type of index Notes If all elements are non-NA/null, returns None. Also returns None for empty Series/DataFrame.
pandas.reference.api.pandas.dataframe.first_valid_index
pandas.DataFrame.flags propertyDataFrame.flags Get the properties associated with this pandas object. The available flags are Flags.allows_duplicate_labels See also Flags Flags that apply to pandas objects. DataFrame.attrs Global metadata applying to this dataset. Notes “Flags” differ from “metadata”. Fla...
pandas.reference.api.pandas.dataframe.flags
pandas.DataFrame.floordiv DataFrame.floordiv(other, axis='columns', level=None, fill_value=None)[source] Get Integer division of dataframe and other, element-wise (binary operator floordiv). Equivalent to dataframe // other, but with support to substitute a fill_value for missing data in one of the inputs. With rev...
pandas.reference.api.pandas.dataframe.floordiv
pandas.DataFrame.from_dict classmethodDataFrame.from_dict(data, orient='columns', dtype=None, columns=None)[source] Construct DataFrame from dict of array-like or dicts. Creates DataFrame object from dictionary by columns or by index allowing dtype specification. Parameters data:dict Of the form {field : arra...
pandas.reference.api.pandas.dataframe.from_dict
pandas.DataFrame.from_records classmethodDataFrame.from_records(data, index=None, exclude=None, columns=None, coerce_float=False, nrows=None)[source] Convert structured or record ndarray to DataFrame. Creates a DataFrame object from a structured ndarray, sequence of tuples or dicts, or DataFrame. Parameters dat...
pandas.reference.api.pandas.dataframe.from_records
pandas.DataFrame.ge DataFrame.ge(other, axis='columns', level=None)[source] Get Greater than or equal to of dataframe and other, element-wise (binary operator ge). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or column...
pandas.reference.api.pandas.dataframe.ge
pandas.DataFrame.get DataFrame.get(key, default=None)[source] Get item from object for given key (ex: DataFrame column). Returns default value if not found. Parameters key:object Returns value:same type as items contained in object Examples >>> df = pd.DataFrame( ... [ ... [24.3, 75.7, "h...
pandas.reference.api.pandas.dataframe.get
pandas.DataFrame.groupby DataFrame.groupby(by=None, axis=0, level=None, as_index=True, sort=True, group_keys=True, squeeze=NoDefault.no_default, observed=False, dropna=True)[source] Group DataFrame using a mapper or by a Series of columns. A groupby operation involves some combination of splitting the object, apply...
pandas.reference.api.pandas.dataframe.groupby
pandas.DataFrame.gt DataFrame.gt(other, axis='columns', level=None)[source] Get Greater than of dataframe and other, element-wise (binary operator gt). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or columns) and level...
pandas.reference.api.pandas.dataframe.gt
pandas.DataFrame.head DataFrame.head(n=5)[source] Return the first n rows. This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it. For negative values of n, this function returns all rows except the last n rows, equiv...
pandas.reference.api.pandas.dataframe.head
pandas.DataFrame.hist DataFrame.hist(column=None, by=None, grid=True, xlabelsize=None, xrot=None, ylabelsize=None, yrot=None, ax=None, sharex=False, sharey=False, figsize=None, layout=None, bins=10, backend=None, legend=False, **kwargs)[source] Make a histogram of the DataFrame’s columns. A histogram is a represent...
pandas.reference.api.pandas.dataframe.hist
pandas.DataFrame.iat propertyDataFrame.iat Access a single value for a row/column pair by integer position. Similar to iloc, in that both provide integer-based lookups. Use iat if you only need to get or set a single value in a DataFrame or Series. Raises IndexError When integer position is out of bounds. ...
pandas.reference.api.pandas.dataframe.iat
pandas.DataFrame.idxmax DataFrame.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’ for column-wise. skipna:boo...
pandas.reference.api.pandas.dataframe.idxmax
pandas.DataFrame.idxmin DataFrame.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’ for column-wise. skipna:boo...
pandas.reference.api.pandas.dataframe.idxmin
pandas.DataFrame.iloc propertyDataFrame.iloc Purely integer-location based indexing for selection by position. .iloc[] is primarily integer position based (from 0 to length-1 of the axis), but may also be used with a boolean array. Allowed inputs are: An integer, e.g. 5. A list or array of integers, e.g. [4, 3, 0]...
pandas.reference.api.pandas.dataframe.iloc
pandas.DataFrame.index DataFrame.index The index (row labels) of the DataFrame.
pandas.reference.api.pandas.dataframe.index
pandas.DataFrame.infer_objects DataFrame.infer_objects()[source] Attempt to infer better dtypes for object columns. Attempts soft conversion of object-dtyped columns, leaving non-object and unconvertible columns unchanged. The inference rules are the same as during normal Series/DataFrame construction. Returns ...
pandas.reference.api.pandas.dataframe.infer_objects
pandas.DataFrame.info DataFrame.info(verbose=None, buf=None, max_cols=None, memory_usage=None, show_counts=None, null_counts=None)[source] Print a concise summary of a DataFrame. This method prints information about a DataFrame including the index dtype and columns, non-null values and memory usage. Parameters ...
pandas.reference.api.pandas.dataframe.info
pandas.DataFrame.insert DataFrame.insert(loc, column, value, allow_duplicates=False)[source] Insert column into DataFrame at specified location. Raises a ValueError if column is already contained in the DataFrame, unless allow_duplicates is set to True. Parameters loc:int Insertion index. Must verify 0 <= loc...
pandas.reference.api.pandas.dataframe.insert
pandas.DataFrame.interpolate DataFrame.interpolate(method='linear', axis=0, limit=None, inplace=False, limit_direction=None, limit_area=None, downcast=None, **kwargs)[source] Fill NaN values using an interpolation method. Please note that only method='linear' is supported for DataFrame/Series with a MultiIndex. Pa...
pandas.reference.api.pandas.dataframe.interpolate
pandas.DataFrame.isin DataFrame.isin(values)[source] Whether each element in the DataFrame is contained in values. Parameters values:iterable, Series, DataFrame or dict The result will only be true at a location if all the labels match. If values is a Series, that’s the index. If values is a dict, the keys mu...
pandas.reference.api.pandas.dataframe.isin
pandas.DataFrame.isna DataFrame.isna()[source] Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None or numpy.NaN, gets mapped to True values. Everything else gets mapped to False values. Characters such as empty strings '' or numpy.inf are not considered...
pandas.reference.api.pandas.dataframe.isna
pandas.DataFrame.isnull DataFrame.isnull()[source] DataFrame.isnull is an alias for DataFrame.isna. Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None or numpy.NaN, gets mapped to True values. Everything else gets mapped to False values. Characters suc...
pandas.reference.api.pandas.dataframe.isnull
pandas.DataFrame.items DataFrame.items()[source] Iterate over (column name, Series) pairs. Iterates over the DataFrame columns, returning a tuple with the column name and the content as a Series. Yields label:object The column names for the DataFrame being iterated over. content:Series The column entries ...
pandas.reference.api.pandas.dataframe.items
pandas.DataFrame.iteritems DataFrame.iteritems()[source] Iterate over (column name, Series) pairs. Iterates over the DataFrame columns, returning a tuple with the column name and the content as a Series. Yields label:object The column names for the DataFrame being iterated over. content:Series The column ...
pandas.reference.api.pandas.dataframe.iteritems
pandas.DataFrame.iterrows DataFrame.iterrows()[source] Iterate over DataFrame rows as (index, Series) pairs. Yields index:label or tuple of label The index of the row. A tuple for a MultiIndex. data:Series The data of the row as a Series. See also DataFrame.itertuples Iterate over DataFrame rows as...
pandas.reference.api.pandas.dataframe.iterrows
pandas.DataFrame.itertuples DataFrame.itertuples(index=True, name='Pandas')[source] Iterate over DataFrame rows as namedtuples. Parameters index:bool, default True If True, return the index as the first element of the tuple. name:str or None, default “Pandas” The name of the returned namedtuples or None t...
pandas.reference.api.pandas.dataframe.itertuples
pandas.DataFrame.join DataFrame.join(other, on=None, how='left', lsuffix='', rsuffix='', sort=False)[source] Join columns of another DataFrame. Join columns with other DataFrame either on index or on a key column. Efficiently join multiple DataFrame objects by index at once by passing a list. Parameters other:D...
pandas.reference.api.pandas.dataframe.join
pandas.DataFrame.keys DataFrame.keys()[source] Get the ‘info axis’ (see Indexing for more). This is index for Series, columns for DataFrame. Returns Index Info axis.
pandas.reference.api.pandas.dataframe.keys
pandas.DataFrame.kurt DataFrame.kurt(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return unbiased kurtosis over requested axis. Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1. Parameters axis:{index (0), columns ...
pandas.reference.api.pandas.dataframe.kurt
pandas.DataFrame.kurtosis DataFrame.kurtosis(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return unbiased kurtosis over requested axis. Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1. Parameters axis:{index (0), ...
pandas.reference.api.pandas.dataframe.kurtosis
pandas.DataFrame.last DataFrame.last(offset)[source] Select final periods of time series data based on a date offset. For a DataFrame with a sorted DatetimeIndex, this function selects the last few rows based on a date offset. Parameters offset:str, DateOffset, dateutil.relativedelta The offset length of the ...
pandas.reference.api.pandas.dataframe.last
pandas.DataFrame.last_valid_index DataFrame.last_valid_index()[source] Return index for last non-NA value or None, if no NA value is found. Returns scalar:type of index Notes If all elements are non-NA/null, returns None. Also returns None for empty Series/DataFrame.
pandas.reference.api.pandas.dataframe.last_valid_index
pandas.DataFrame.le DataFrame.le(other, axis='columns', level=None)[source] Get Less than or equal to of dataframe and other, element-wise (binary operator le). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or columns) ...
pandas.reference.api.pandas.dataframe.le
pandas.DataFrame.loc propertyDataFrame.loc Access a group of rows and columns by label(s) or a boolean array. .loc[] is primarily label based, but may also be used with a boolean array. Allowed inputs are: A single label, e.g. 5 or 'a', (note that 5 is interpreted as a label of the index, and never as an integer p...
pandas.reference.api.pandas.dataframe.loc
pandas.DataFrame.lookup DataFrame.lookup(row_labels, col_labels)[source] Label-based “fancy indexing” function for DataFrame. Given equal-length arrays of row and column labels, return an array of the values corresponding to each (row, col) pair. Deprecated since version 1.2.0: DataFrame.lookup is deprecated, use ...
pandas.reference.api.pandas.dataframe.lookup
pandas.DataFrame.lt DataFrame.lt(other, axis='columns', level=None)[source] Get Less than of dataframe and other, element-wise (binary operator lt). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or columns) and level fo...
pandas.reference.api.pandas.dataframe.lt
pandas.DataFrame.mad DataFrame.mad(axis=None, skipna=True, level=None)[source] 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 resu...
pandas.reference.api.pandas.dataframe.mad
pandas.DataFrame.mask DataFrame.mask(cond, other=nan, inplace=False, axis=None, level=None, errors='raise', try_cast=NoDefault.no_default)[source] Replace values where the condition is True. Parameters cond:bool Series/DataFrame, array-like, or callable Where cond is False, keep the original value. Where True...
pandas.reference.api.pandas.dataframe.mask
pandas.DataFrame.max DataFrame.max(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return the maximum of the values over the requested axis. If you want the index of the maximum, use idxmax. This is the equivalent of the numpy.ndarray method argmax. Parameters axis:{inde...
pandas.reference.api.pandas.dataframe.max
pandas.DataFrame.mean DataFrame.mean(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return the mean 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 va...
pandas.reference.api.pandas.dataframe.mean
pandas.DataFrame.median DataFrame.median(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return the median 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/n...
pandas.reference.api.pandas.dataframe.median
pandas.DataFrame.melt DataFrame.melt(id_vars=None, value_vars=None, var_name=None, value_name='value', col_level=None, ignore_index=True)[source] Unpivot a DataFrame from wide to long format, optionally leaving identifiers set. This function is useful to massage a DataFrame into a format where one or more columns a...
pandas.reference.api.pandas.dataframe.melt
pandas.DataFrame.memory_usage DataFrame.memory_usage(index=True, deep=False)[source] Return the memory usage of each column in bytes. The memory usage can optionally include the contribution of the index and elements of object dtype. This value is displayed in DataFrame.info by default. This can be suppressed by se...
pandas.reference.api.pandas.dataframe.memory_usage
pandas.DataFrame.merge DataFrame.merge(right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy=True, indicator=False, validate=None)[source] Merge DataFrame or named Series objects with a database-style join. A named Series object is tre...
pandas.reference.api.pandas.dataframe.merge
pandas.DataFrame.min DataFrame.min(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source] Return the minimum of the values over the requested axis. If you want the index of the minimum, use idxmin. This is the equivalent of the numpy.ndarray method argmin. Parameters axis:{inde...
pandas.reference.api.pandas.dataframe.min
pandas.DataFrame.mod DataFrame.mod(other, axis='columns', level=None, fill_value=None)[source] Get Modulo of dataframe and other, element-wise (binary operator mod). Equivalent to dataframe % other, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, rmod. Among ...
pandas.reference.api.pandas.dataframe.mod
pandas.DataFrame.mode DataFrame.mode(axis=0, numeric_only=False, dropna=True)[source] Get the mode(s) of each element along the selected axis. The mode of a set of values is the value that appears most often. It can be multiple values. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The axis to iter...
pandas.reference.api.pandas.dataframe.mode
pandas.DataFrame.mul DataFrame.mul(other, axis='columns', level=None, fill_value=None)[source] Get Multiplication of dataframe and other, element-wise (binary operator mul). Equivalent to dataframe * other, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, rmul...
pandas.reference.api.pandas.dataframe.mul
pandas.DataFrame.multiply DataFrame.multiply(other, axis='columns', level=None, fill_value=None)[source] Get Multiplication of dataframe and other, element-wise (binary operator mul). Equivalent to dataframe * other, but with support to substitute a fill_value for missing data in one of the inputs. With reverse ver...
pandas.reference.api.pandas.dataframe.multiply
pandas.DataFrame.ndim propertyDataFrame.ndim Return an int representing the number of axes / array dimensions. Return 1 if Series. Otherwise return 2 if DataFrame. See also ndarray.ndim Number of array dimensions. Examples >>> s = pd.Series({'a': 1, 'b': 2, 'c': 3}) >>> s.ndim 1 >>> df = pd.DataFrame({'co...
pandas.reference.api.pandas.dataframe.ndim
pandas.DataFrame.ne DataFrame.ne(other, axis='columns', level=None)[source] Get Not equal to of dataframe and other, element-wise (binary operator ne). Among flexible wrappers (eq, ne, le, lt, ge, gt) to comparison operators. Equivalent to ==, !=, <=, <, >=, > with support to choose axis (rows or columns) and level...
pandas.reference.api.pandas.dataframe.ne
pandas.DataFrame.nlargest DataFrame.nlargest(n, columns, keep='first')[source] Return the first n rows ordered by columns in descending order. Return the first n rows with the largest values in columns, in descending order. The columns that are not specified are returned as well, but not used for ordering. This met...
pandas.reference.api.pandas.dataframe.nlargest
pandas.DataFrame.notna DataFrame.notna()[source] Detect existing (non-missing) values. Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_...
pandas.reference.api.pandas.dataframe.notna
pandas.DataFrame.notnull DataFrame.notnull()[source] DataFrame.notnull is an alias for DataFrame.notna. Detect existing (non-missing) values. Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not consid...
pandas.reference.api.pandas.dataframe.notnull
pandas.DataFrame.nsmallest DataFrame.nsmallest(n, columns, keep='first')[source] Return the first n rows ordered by columns in ascending order. Return the first n rows with the smallest values in columns, in ascending order. The columns that are not specified are returned as well, but not used for ordering. This me...
pandas.reference.api.pandas.dataframe.nsmallest
pandas.DataFrame.nunique DataFrame.nunique(axis=0, dropna=True)[source] Count number of distinct elements in specified axis. Return Series with number of distinct elements. Can ignore NaN values. Parameters axis:{0 or ‘index’, 1 or ‘columns’}, default 0 The axis to use. 0 or ‘index’ for row-wise, 1 or ‘column...
pandas.reference.api.pandas.dataframe.nunique
pandas.DataFrame.pad DataFrame.pad(axis=None, inplace=False, limit=None, downcast=None)[source] Synonym for DataFrame.fillna() with method='ffill'. Returns Series/DataFrame or None Object with missing values filled or None if inplace=True.
pandas.reference.api.pandas.dataframe.pad
pandas.DataFrame.pct_change DataFrame.pct_change(periods=1, fill_method='pad', limit=None, freq=None, **kwargs)[source] Percentage change between the current and a prior element. Computes the percentage change from the immediately previous row by default. This is useful in comparing the percentage of change in a ti...
pandas.reference.api.pandas.dataframe.pct_change