pandas API reference

3.1.1

Find out what pandas 3.1.1 functions and methods do, how to call them, and how to combine them in your own code.

On this page

Functions, methods, and attributes

Call a function from pandas, such as pd.to_numeric(). Call a method on an object, such as frame.head(). Read an attribute or property, such as frame.shape, without parentheses. In the reference, names start with pandas, and methods show the class they belong to.

import pandas as pd

frame = pd.DataFrame({"units": ["4", "7", "invalid"]})
units = pd.to_numeric(frame["units"], errors="coerce")
print(units.head(2).tolist())
print(frame.shape)
print(units.isna().sum())
Example output
[4.0, 7.0]
(3, 1)
1

Data for the examples

Run this setup once in a notebook or Python session. The examples below use the same orders and teams tables. The three orders include one missing quantity so you can compare counting rows with counting usable values.

from io import StringIO
import pandas as pd

orders = pd.DataFrame({
    "team": ["North", "North", "South"],
    "day": pd.to_datetime(["2025-01-01", "2025-01-02", "2025-01-03"]),
    "units": [4, None, 7],
})
teams = pd.DataFrame({
    "team": ["North", "South"],
    "region": ["A", "B"],
})

print(orders.groupby("team")["units"].agg(["size", "count", "sum"]).to_dict())
Example output
{'size': {'North': 2, 'South': 1}, 'count': {'North': 1, 'South': 1}, 'sum': {'North': 4.0, 'South': 7.0}}

Find an API

Expand a group in the sidebar or search below for read_csv, groupby, or str.strip. Select a name to see its parameters and run its example.

1,794 of 1,794 entries

General functions (37)
  • Import data from an object that implements the dataframe interchange protocol.

    Call syntax api.interchange.from_dataframe(df[, allow_copy])

  • pandas.api.typing.Expressionclass
  • Build a DatetimeIndex of business days, optionally using a custom workweek and holidays.

    Call syntax pd.bdate_range([start, end, periods, freq, tz, ...])

    Example
    pd.bdate_range("2025-01-03", periods=3)
  • pandas.colfunction

    Create a deferred column expression for operations such as assign and loc.

    Call syntax pd.col(col_name)

  • Stack pandas objects along rows or place them side by side. Use axis=1 for columns and ignore_index=True to renumber the combined axis.

    Call syntax pd.concat(objs, *[, axis, join, ignore_index, ...])

    Example
    pd.concat([orders.iloc[:2], orders.iloc[2:]], ignore_index=True)
  • Count combinations of categories in a table. Supply values and aggfunc to calculate another summary.

    Call syntax pd.crosstab(index, columns[, values, rownames, ...])

    Example
    pd.crosstab(orders["team"], orders["units"].notna())
  • pandas.cutfunction

    Assign numeric values to specified intervals or to a fixed number of equal-width bins.

    Call syntax pd.cut(x, bins[, right, labels, retbins, ...])

    Example
    pd.cut(orders["units"], bins=[0, 5, 10], labels=["Small", "Large"])
  • Generate timestamps on a regular schedule and return a DatetimeIndex.

    Call syntax pd.date_range([start, end, periods, freq, tz, ...])

    Example
    pd.date_range("2025-01-01", periods=3, freq="D")
  • pandas.evalfunction

    Evaluate a trusted expression over variables or table columns. A DataFrame call uses its columns as named inputs.

    Call syntax pd.eval(expr[, parser, engine, local_dict, ...])

  • Encode distinct values as integers and return the codes alongside the corresponding unique values.

    Call syntax pd.factorize(values[, sort, use_na_sentinel, ...])

    Example
    pd.factorize(orders["team"])
  • Rebuild categorical columns from dummy indicator columns.

    Call syntax pd.from_dummies(data[, sep, default_category])

  • Expand categorical values into indicator columns, one per category.

    Call syntax pd.get_dummies(data[, prefix, prefix_sep, ...])

    Example
    pd.get_dummies(orders["team"], prefix="team")
  • Infer a regular frequency from dates or timedeltas when the observations permit it.

    Call syntax pd.infer_freq(index)

  • Construct an IntervalIndex with evenly spaced boundaries.

    Call syntax pd.interval_range([start, end, periods, freq, ...])

    Example
    pd.interval_range(start=0, end=10, periods=2)
  • Write the configured Stata data file, including its data and metadata.

    Call syntax StataWriter.write_file()

  • pandas.isnafunction

    Identify missing values. The result is a boolean for a scalar and a boolean mask for an array-like input.

    Call syntax pd.isna(obj)

    Example
    pd.isna(orders["units"])
  • Use isna to identify missing values.

    Call syntax pd.isnull(obj)

  • Move groups of equally sized wide columns into aligned long-form columns.

    Call syntax pd.lreshape(data, groups[, dropna])

  • pandas.meltfunction

    Keep identifier columns and turn measured columns into variable–value rows.

    Call syntax pd.melt(frame[, id_vars, value_vars, var_name, ...])

    Example
    pd.melt(orders, id_vars="team", value_vars=["units"])
  • pandas.mergefunction

    Join tables by matching keys. Set how for the join type and validate to check the expected key relationship.

    Call syntax pd.merge(left, right[, how, on, left_on, ...])

    Example
    pd.merge(orders, teams, on="team", how="left", validate="many_to_one")
  • Match each ordered key to a nearby key in the other table. Sort the keys first and use direction or tolerance to control the match.

    Call syntax pd.merge_asof(left, right[, on, left_on, ...])

  • Join ordered data such as time series, with optional forward-filling across the merged sequence.

    Call syntax pd.merge_ordered(left, right[, on, left_on, ...])

  • pandas.notnafunction

    Identify present values by inverting the isna result.

    Call syntax pd.notna(obj)

    Example
    pd.notna(orders["units"])
  • Use notna to identify present values.

    Call syntax pd.notnull(obj)

  • Generate consecutive periods such as months or quarters and return a PeriodIndex.

    Call syntax pd.period_range([start, end, periods, freq, name])

    Example
    pd.period_range("2025-01", periods=3, freq="M")
  • pandas.pivotfunction

    Move distinct values into columns. Each output row–column pair needs a single source value.

    Call syntax pd.pivot(data, *, columns[, index, values])

    Example
    pd.pivot(orders, index="day", columns="team", values="units")
  • Group rows and columns into a summary table. Use aggfunc to control how repeated combinations are reduced.

    Call syntax pd.pivot_table(data[, values, index, columns, ...])

    Example
    pd.pivot_table(orders, index="team", values="units", aggfunc="sum")
  • pandas.qcutfunction

    Make bins based on quantiles so bins have approximately equal numbers of observations.

    Call syntax pd.qcut(x, q[, labels, retbins, precision, ...])

    Example
    pd.qcut(pd.Series([10, 20, 30, 40]), q=2)
  • Build a TimedeltaIndex at fixed increments between specified boundaries.

    Call syntax pd.timedelta_range([start, end, periods, freq, ...])

    Example
    pd.timedelta_range("0h", periods=3, freq="1h")
  • Parse input as datetimes. Use format for a known layout, utc=True to normalize to UTC and errors="coerce" to mark invalid values as NaT.

    Call syntax pd.to_datetime(arg[, errors, dayfirst, ...])

    Example
    pd.to_datetime(["2025-01-01", "invalid"], format="%Y-%m-%d", errors="coerce")
  • Parse input as numbers. Use errors="coerce" for invalid input and downcast when a smaller numeric dtype is suitable.

    Call syntax pd.to_numeric(arg[, errors, downcast, ...])

    Example
    pd.to_numeric(pd.Series(["4", "invalid"]), errors="coerce")
  • Parse durations into timedelta values. Specify unit for numeric durations.

    Call syntax pd.to_timedelta(arg[, unit, errors])

    Example
    pd.to_timedelta([15, 30], unit="min")
  • Try to infer a strptime-style format string from one date string.

    Call syntax tseries.api.guess_datetime_format(dt_str[, ...])

  • Get distinct values in encounter order without sorting.

    Call syntax pd.unique(values)

    Example
    pd.unique(orders["team"])
  • Compute a 64-bit hash for each element of a one-dimensional array.

    Call syntax util.hash_array(vals[, encoding, hash_key, ...])

  • Compute element-wise hashes, optionally incorporating the pandas object's index.

    Call syntax util.hash_pandas_object(obj[, index, ...])

  • Turn column families such as sales_2025 and sales_2026 into rows using shared prefixes and changing suffixes.

    Call syntax pd.wide_to_long(df, stubnames, i, j[, sep, suffix])

Input and output (59)
  • pandas.api.typing.JsonReaderclass
  • Write records to an Apache Iceberg table through an Iceberg catalog.

    Call syntax DataFrame.to_iceberg(table_identifier[, ...])

  • Serialize DataFrame rows and fields as an XML document.

    Call syntax DataFrame.to_xml([path_or_buffer, index, ...])

  • pandas.ExcelFileclass
  • pandas.ExcelFile.bookproperty
  • Read worksheets from an open ExcelFile. This method is deprecated in pandas 3.1.1. Use read_excel with the open workbook instead.

    Call syntax ExcelFile.parse([sheet_name, header, names, ...])

  • pandas.ExcelFile.sheet_namesproperty
  • pandas.ExcelWriterclass
  • Add rows to an HDFStore table without replacing existing rows.

    Call syntax HDFStore.append(key, value[, format, axes, ...])

  • Split columns between related HDF tables and append the new rows to them.

    Call syntax HDFStore.append_to_multiple(d, value, selector)

  • Copy stored pandas objects to another HDF5 file, optionally selecting keys.

    Call syntax HDFStore.copy(file[, mode, propindexes, ...])

  • Build a PyTables index on stored columns for indexed queries.

    Call syntax HDFStore.create_table_index(key[, columns, ...])

  • Send pending HDFStore writes to disk.

    Call syntax HDFStore.flush([fsync])

  • Retrieve an object by key. A Series or DataFrame can also return a supplied default for an unknown key.

    Call syntax HDFStore.get(key)

  • Access the HDFStore storer that manages the object at a given key.

    Call syntax HDFStore.get_storer(key)

  • List the top-level nodes in an HDFStore.

    Call syntax HDFStore.groups()

  • Report the path and stored objects described by the HDFStore.

    Call syntax HDFStore.info()

  • pandas.HDFStore.is_openproperty
  • List stored object keys, including their HDF group paths.

    Call syntax HDFStore.keys([include])

  • Save a pandas object at a key in an HDFStore, replacing any existing value there.

    Call syntax HDFStore.put(key, value[, format, index, ...])

  • Delete an HDFStore object or remove rows that meet the supplied condition.

    Call syntax HDFStore.remove(key[, where, start, stop])

  • Read an HDFStore table or object. For tables, supply where to restrict rows.

    Call syntax HDFStore.select(key[, where, start, stop, ...])

  • Get the row positions selected by an HDFStore table query.

    Call syntax HDFStore.select_as_coordinates(key[, where, ...])

  • Read and combine columns from several HDFStore tables that share corresponding rows.

    Call syntax HDFStore.select_as_multiple(keys[, where, ...])

  • Read a single column from a stored HDF table.

    Call syntax HDFStore.select_column(key, column[, start, ...])

  • Iterate through the groups in an HDF file to discover stored pandas objects.

    Call syntax HDFStore.walk([where])

  • Write the receiver to an Excel sheet. Use ExcelWriter to manage multiple sheets in one workbook.

    Call syntax Styler.to_excel(excel_writer[, sheet_name, ...])

  • Render the receiver as an HTML table. A Styler includes applicable styling rules in its output.

    Call syntax Styler.to_html([buf, table_uuid, ...])

  • Produce a LaTeX table representation of the receiver.

    Call syntax Styler.to_latex([buf, column_format, ...])

  • Build a JSON Table Schema descriptor from a DataFrame or Series.

    Call syntax build_table_schema(data[, index, ...])

  • pandas.io.parsers.readers.TextFileReaderclass
  • pandas.io.parsers.TextFileReaderclass
  • Release the parser and its file handle. Other readers and writers release their associated resources.

    Call syntax TextFileReader.close()

  • Read the next batch from a TextFileReader, optionally overriding the configured chunk size.

    Call syntax TextFileReader.get_chunk([size])

  • Read the next requested number of rows from the TextFileReader into a DataFrame.

    Call syntax TextFileReader.read([nrows])

  • pandas.io.stata.StataReader.data_labelproperty
  • Map each Stata value-label set to its code-to-label mapping.

    Call syntax StataReader.value_labels()

  • Map Stata column names to their descriptive labels.

    Call syntax StataReader.variable_labels()

  • Flatten nested JSON-like records into columns. Set record_path to choose a nested list of records.

    Call syntax pd.json_normalize(data[, record_path, meta, ...])

    Example
    pd.json_normalize([{"id": 1, "location": {"city": "Yangon"}}])
  • Parse delimited text from the system clipboard into a DataFrame.

    Call syntax pd.read_clipboard([sep, dtype_backend])

  • Parse delimited text into a DataFrame. Use dtype for identifier columns and usecols or chunksize to limit the data read.

    Call syntax pd.read_csv(filepath_or_buffer, *[, sep, ...])

    Example
    pd.read_csv(StringIO("id,units\n001,4\n"), dtype={"id": "string"})
  • Read a worksheet or multiple worksheets. Use sheet_name to choose sheets and header to identify column labels.

    Call syntax pd.read_excel(io[, sheet_name, header, names, ...])

  • Read a Feather file into a DataFrame, optionally selecting a subset of its columns.

    Call syntax pd.read_feather(path[, columns, use_threads, ...])

  • Parse columns whose positions are fixed within each text line.

    Call syntax pd.read_fwf(filepath_or_buffer, *[, colspecs, ...])

  • Load an object by key from HDF5, with row filtering available for table-format data.

    Call syntax pd.read_hdf(path_or_buf[, key, mode, errors, ...])

  • Extract matching HTML tables and return a list of DataFrames.

    Call syntax pd.read_html(io, *[, match, flavor, header, ...])

  • Load table data through an Apache Iceberg catalog.

    Call syntax pd.read_iceberg(table_identifier[, ...])

  • Read a JSON file or stream. Set orient for the record layout and lines=True for newline-delimited records.

    Call syntax pd.read_json(path_or_buf, *[, orient, typ, ...])

  • Load an ORC file into a DataFrame, with optional column selection.

    Call syntax pd.read_orc(path[, columns, dtype_backend, ...])

  • Load a Parquet file or dataset. Use columns to read selected columns and filters where supported to reduce the rows scanned.

    Call syntax pd.read_parquet(path[, engine, columns, ...])

  • Restore a pickled Python object, such as a DataFrame. Load pickle files only from trusted sources.

    Call syntax pd.read_pickle(filepath_or_buffer[, ...])

  • Load data from a SAS XPORT or SAS7BDAT file.

    Call syntax pd.read_sas(filepath_or_buffer, *[, format, ...])

  • Load a DataFrame from an SPSS data file.

    Call syntax pd.read_spss(path[, usecols, ...])

  • Load a database table or SQL query result as a DataFrame.

    Call syntax pd.read_sql(sql, con[, index_col, ...])

  • Execute a SELECT query and load its result. Supply query values through params.

    Call syntax pd.read_sql_query(sql, con[, index_col, ...])

  • Load columns from a named SQL database table.

    Call syntax pd.read_sql_table(table_name, con[, schema, ...])

  • Load Stata data and optionally decode labeled values into categories.

    Call syntax pd.read_stata(filepath_or_buffer, *[, ...])

  • Read delimited text into a DataFrame. The default delimiter is a tab.

    Call syntax pd.read_table(filepath_or_buffer, *[, sep, ...])

  • Turn elements selected from XML into DataFrame rows and columns.

    Call syntax pd.read_xml(path_or_buffer, *[, xpath, ...])

DataFrame (219)
  • pandas.DataFrameclass
  • Implement + for the receiver, including its label alignment or offset rules.

    Call syntax DataFrame.__add__(other)

  • Expose tabular data through the dataframe interchange protocol.

    Call syntax DataFrame.__dataframe__([nan_as_null, ...])

  • Implement ~ for the receiver. For a boolean mask, flip true and false.

    Call syntax DataFrame.__invert__()

  • Support iteration, yielding columns for a DataFrame or key–object pairs for GroupBy.

    Call syntax DataFrame.__iter__()

  • Take the absolute value of each numeric element.

    Call syntax DataFrame.abs()

  • Add corresponding values. Labeled pandas operands align by their labels.

    Call syntax DataFrame.add(other[, axis, level, fill_value])

  • Prepend text to labels on the chosen axis.

    Call syntax DataFrame.add_prefix(prefix[, axis])

  • Append text to labels on the chosen axis.

    Call syntax DataFrame.add_suffix(suffix[, axis])

  • Summarize values with named operations or callables. The result shape depends on the operations and object.

    Call syntax DataFrame.agg([func, axis])

  • Summarize values with one or more operations using the same interface as agg.

    Call syntax DataFrame.aggregate([func, axis])

  • Return two objects with compatible labels. Set join to choose which labels to retain.

    Call syntax DataFrame.align(other[, join, axis, level, ...])

  • Test whether every value along the selected axis or group evaluates to true.

    Call syntax DataFrame.all(*[, axis, bool_only, skipna])

  • Test whether at least one value along the selected axis or group evaluates to true.

    Call syntax DataFrame.any(*[, axis, bool_only, skipna])

  • Apply a callable to one column at a time by default, or one row at a time with axis=1.

    Call syntax DataFrame.apply(func[, axis, raw, ...])

  • Conform the object to a frequency. Use resample to aggregate observations into time bins.

    Call syntax DataFrame.asfreq(freq[, method, how, ...])

  • Look up the last usable observation at or before the requested label.

    Call syntax DataFrame.asof(where[, subset])

  • Build a new DataFrame with added or replaced columns. Callables can use columns assigned earlier in the same call.

    Call syntax DataFrame.assign(**kwargs)

    Example
    orders.assign(double_units=lambda frame: frame["units"] * 2)
  • Convert to another dtype. A DataFrame accepts a mapping to choose conversions column by column.

    Call syntax DataFrame.astype(dtype[, copy, errors])

    Example
    orders.astype({"units": "Float64"})
  • pandas.DataFrame.atproperty

    Read or set a single value using its row and column labels.

  • Select observations at one clock time from a datetime-indexed object.

    Call syntax DataFrame.at_time(time[, asof, axis])

  • pandas.DataFrame.attrsproperty
  • pandas.DataFrame.axesproperty
  • Select observations within a clock-time range, independent of their calendar dates.

    Call syntax DataFrame.between_time(start_time, end_time)

  • Fill a gap using the next available value along the selected direction.

    Call syntax DataFrame.bfill(*[, axis, inplace, limit, ...])

  • Draw box plots to compare medians, spread and possible outliers.

    Call syntax DataFrame.boxplot([column, by, ax, ...])

  • Clamp values to lower or upper limits, leaving values within the limits unchanged.

    Call syntax DataFrame.clip([lower, upper, axis, inplace])

    Example
    orders[["units"]].clip(upper=5)
  • pandas.DataFrame.columnsattribute

    Get the Index containing column labels.

  • Combine aligned objects using a callable. DataFrame passes columns to the callable and Series passes individual values.

    Call syntax DataFrame.combine(other, func[, fill_value, ...])

  • Fill missing positions from a second aligned object while keeping existing valid values.

    Call syntax DataFrame.combine_first(other)

  • Display the differences between two equally labeled objects side by side.

    Call syntax DataFrame.compare(other[, align_axis, ...])

  • Infer dtypes with support for missing values, such as nullable integers or strings.

    Call syntax DataFrame.convert_dtypes([infer_objects, ...])

  • Make a copy of the receiver. For an HDFStore, copy stored data to a different file.

    Call syntax DataFrame.copy([deep])

  • Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.

    Call syntax DataFrame.corr([method, min_periods, ...])

  • Calculate correlations with corresponding rows or columns of another object.

    Call syntax DataFrame.corrwith(other[, axis, drop, ...])

  • Count nonmissing values along the selected axis or within each group or window.

    Call syntax DataFrame.count([axis, numeric_only])

  • Estimate how pairs of numeric inputs vary together from aligned observations.

    Call syntax DataFrame.cov([min_periods, ddof, numeric_only])

  • Track the largest value encountered up to each position.

    Call syntax DataFrame.cummax([axis, skipna, numeric_only])

  • Track the smallest value encountered up to each position.

    Call syntax DataFrame.cummin([axis, skipna, numeric_only])

  • Keep a running product in observation order.

    Call syntax DataFrame.cumprod([axis, skipna, numeric_only])

  • Keep a running total in observation order.

    Call syntax DataFrame.cumsum([axis, skipna, numeric_only])

  • Summarize values with statistics appropriate to their dtype, such as quartiles for numbers or frequencies for categories.

    Call syntax DataFrame.describe([percentiles, include, ...])

    Example
    orders[["units"]].describe()
  • Subtract an earlier observation from the current one. Change periods to adjust the distance.

    Call syntax DataFrame.diff([periods, axis])

  • Divide corresponding values with true division, preserving fractional quotients.

    Call syntax DataFrame.div(other[, axis, level, fill_value])

  • Compute a dot product or matrix multiplication, aligning shared labels where applicable.

    Call syntax DataFrame.dot(other)

  • Remove rows or columns by label. Specify columns= to make column removal explicit.

    Call syntax DataFrame.drop([labels, axis, index, ...])

    Example
    orders.drop(columns="day")
  • Keep one occurrence of duplicate values or rows by default. Use keep to choose which occurrences survive.

    Call syntax DataFrame.drop_duplicates([subset, keep, ...])

    Example
    orders.drop_duplicates(subset=["team"])
  • Remove one or more levels of a hierarchical index.

    Call syntax DataFrame.droplevel(level[, axis])

  • Drop entries with missing values. For DataFrames, subset restricts the columns considered when dropping rows.

    Call syntax DataFrame.dropna(*[, axis, how, thresh, ...])

    Example
    orders.dropna(subset=["units"])
  • pandas.DataFrame.dtypesproperty

    Inspect the dtype of each column in a Series indexed by column name.

    Example
    orders.dtypes
  • Mark repeated values or rows with a boolean mask. Use keep=False to mark every member of a duplicate set.

    Call syntax DataFrame.duplicated([subset, keep])

    Example
    orders.duplicated(subset=["team"])
  • pandas.DataFrame.emptyproperty

    Check whether at least one axis has length zero. A table filled with missing values can still have rows and columns.

  • Compare corresponding values for equality after any applicable label alignment.

    Call syntax DataFrame.eq(other[, axis, level])

  • Check whether two objects have compatible shapes and the same contents, including missing values in the same locations.

    Call syntax DataFrame.equals(other)

  • Evaluate a trusted expression over variables or table columns. A DataFrame call uses its columns as named inputs.

    Call syntax DataFrame.eval(expr, *[, inplace])

  • Build an exponentially weighted window for calculations that emphasize recent observations.

    Call syntax DataFrame.ewm([com, span, halflife, alpha, ...])

  • Build a window that grows from the start through each observation.

    Call syntax DataFrame.expanding([min_periods, method])

  • Expand list-like cells into rows, repeating original row labels as needed.

    Call syntax DataFrame.explode(column[, ignore_index])

  • Fill gaps with the most recent available value in the selected direction.

    Call syntax DataFrame.ffill(*[, axis, inplace, limit, ...])

  • Replace missing values with supplied replacements, such as a scalar or values aligned by label.

    Call syntax DataFrame.fillna(value, *[, axis, inplace, ...])

    Example
    orders.fillna({"units": 0})
  • Select by labels on a DataFrame or Series. On GroupBy keep groups passing a boolean callable.

    Call syntax DataFrame.filter([arg, like, regex, axis, ...])

    Example
    orders.filter(items=["team", "units"])
  • Find the first index label containing a usable value.

    Call syntax DataFrame.first_valid_index()

  • Divide corresponding values and round each quotient down.

    Call syntax DataFrame.floordiv(other[, axis, level, ...])

  • Create a pandas object from data exposed through the Arrow interface.

    Call syntax DataFrame.from_arrow(data)

  • Build a DataFrame from a mapping of columns or rows.

    Call syntax DataFrame.from_dict(data[, orient, dtype, ...])

  • Build a DataFrame from record-like rows or a structured array.

    Call syntax DataFrame.from_records(data[, index, ...])

  • Compare corresponding values using greater-than-or-equal-to.

    Call syntax DataFrame.ge(other[, axis, level])

  • Retrieve an object by key. A Series or DataFrame can also return a supplied default for an unknown key.

    Call syntax DataFrame.get(key[, default])

  • Split an object by keys to aggregate, transform, or filter each group.

    Call syntax DataFrame.groupby([by, level, as_index, ...])

    Example
    orders.groupby("team", dropna=False)["units"].sum(min_count=1)
  • Compare corresponding values using greater-than.

    Call syntax DataFrame.gt(other[, axis, level])

  • Get the first n rows or values. On GroupBy the limit applies within each group.

    Call syntax DataFrame.head([n])

    Example
    orders.head(2)
  • Draw histograms to show how numeric observations are distributed across bins.

    Call syntax DataFrame.hist([column, by, grid, ...])

  • pandas.DataFrame.iatproperty

    Read or set a single value using its integer row and column positions.

  • Get the label of the first maximum along the selected axis or within a group.

    Call syntax DataFrame.idxmax([axis, skipna, numeric_only])

  • Get the label of the first minimum along the selected axis or within a group.

    Call syntax DataFrame.idxmin([axis, skipna, numeric_only])

  • pandas.DataFrame.ilocproperty

    Select or set values by zero-based integer position. A positional slice excludes its stop.

    Example
    orders.iloc[:2, :2]
  • pandas.DataFrame.indexattribute

    Get the Index containing row labels.

  • Try a soft dtype conversion on object data without forcing strings to parse as numbers.

    Call syntax DataFrame.infer_objects([copy])

  • Print a DataFrame summary with its index, column types, non-null counts and memory use.

    Call syntax DataFrame.info([verbose, buf, max_cols, ...])

    Example
    orders.info()
  • Insert a column at the specified position in the existing DataFrame. A column with the same name raises ValueError by default.

    Call syntax DataFrame.insert(loc, column, value[, ...])

  • Estimate missing values from neighboring observations using a selected interpolation method.

    Call syntax DataFrame.interpolate([method, axis, limit, ...])

  • Set a DataFrame column using its integer position.

    Call syntax DataFrame.isetitem(loc, value)

  • Test membership and return a boolean result for each value.

    Call syntax DataFrame.isin(values)

  • Identify missing values. The result is a boolean for a scalar and a boolean mask for an array-like input.

    Call syntax DataFrame.isna()

    Example
    orders.isna()
  • Use isna to identify missing values.

    Call syntax DataFrame.isnull()

  • Iterate over label–value pairs. DataFrame yields each column label and its Series.

    Call syntax DataFrame.items()

  • Iterate over DataFrame rows as index–Series pairs. A returned row can be coerced to a shared dtype.

    Call syntax DataFrame.iterrows()

  • Iterate over DataFrame rows as tuples, optionally including index values.

    Call syntax DataFrame.itertuples([index, name])

  • Combine tables using index labels or a specified key in the calling table.

    Call syntax DataFrame.join(other[, on, how, lsuffix, ...])

  • Get the DataFrame's column labels.

    Call syntax DataFrame.keys()

  • Estimate excess kurtosis, a statistic sensitive to heavy tails in a distribution.

    Call syntax DataFrame.kurt(*[, axis, skipna, numeric_only])

  • Use the same excess kurtosis calculation as kurt.

    Call syntax DataFrame.kurtosis(*[, axis, skipna, ...])

  • Find the last index label containing a usable value.

    Call syntax DataFrame.last_valid_index()

  • Compare corresponding values using less-than-or-equal-to.

    Call syntax DataFrame.le(other[, axis, level])

  • pandas.DataFrame.locproperty

    Select or set values by label or a boolean mask. Label slices can include both endpoints.

    Example
    orders.loc[orders["team"].eq("North"), ["team", "units"]]
  • Compare corresponding values using less-than.

    Call syntax DataFrame.lt(other[, axis, level])

  • Apply a scalar-to-scalar callable cell by cell. Use na_action="ignore" to skip missing cells.

    Call syntax DataFrame.map(func[, na_action])

  • Replace values wherever the condition is true.

    Call syntax DataFrame.mask(cond[, other, inplace, axis, ...])

  • Find the largest value in the selection, group or window.

    Call syntax DataFrame.max(*[, axis, skipna, numeric_only])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax DataFrame.mean(*[, axis, skipna, numeric_only])

  • Find the middle of the sorted values, averaging the central pair when there are two.

    Call syntax DataFrame.median(*[, axis, skipna, numeric_only])

  • Keep identifier columns and turn measured columns into variable–value rows.

    Call syntax DataFrame.melt([id_vars, value_vars, ...])

  • Report bytes accounted for by pandas. For object data, deep=True includes more of the referenced values.

    Call syntax DataFrame.memory_usage([index, deep])

  • Join tables by matching keys. Set how for the join type and validate to check the expected key relationship.

    Call syntax DataFrame.merge(right[, how, on, left_on, ...])

    Example
    orders.merge(teams, on="team", how="left", validate="many_to_one")
  • Find the smallest value in the selection, group or window.

    Call syntax DataFrame.min(*[, axis, skipna, numeric_only])

  • Compute the remainder for each pair of values.

    Call syntax DataFrame.mod(other[, axis, level, fill_value])

  • Find the value or values tied for highest frequency.

    Call syntax DataFrame.mode([axis, numeric_only, dropna])

  • Multiply corresponding values after any applicable label alignment.

    Call syntax DataFrame.mul(other[, axis, level, fill_value])

  • pandas.DataFrame.ndimproperty

    Get the number of axes, which is always two for a DataFrame.

  • Compare corresponding values for inequality.

    Call syntax DataFrame.ne(other[, axis, level])

  • Get the n largest observations.

    Call syntax DataFrame.nlargest(n, columns[, keep])

    Example
    orders.nlargest(2, "units")
  • Identify present values by inverting the isna result.

    Call syntax DataFrame.notna()

  • Use notna to identify present values.

    Call syntax DataFrame.notnull()

  • Get the n smallest observations.

    Call syntax DataFrame.nsmallest(n, columns[, keep])

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax DataFrame.nunique([axis, dropna])

    Example
    orders.nunique(dropna=False)
  • Compute fractional change from an earlier value. Multiply by 100 to express it as a percentage.

    Call syntax DataFrame.pct_change([periods, fill_method, ...])

  • Pass the current object to a callable while staying in a method chain.

    Call syntax DataFrame.pipe(func, *args, **kwargs)

    Example
    orders.pipe(lambda frame: frame.dropna(subset=["units"]))
  • Move distinct values into columns. Each output row–column pair needs a single source value.

    Call syntax DataFrame.pivot(*, columns[, index, values])

  • Group rows and columns into a summary table. Use aggfunc to control how repeated combinations are reduced.

    Call syntax DataFrame.pivot_table([values, index, ...])

  • Create a chart using the chosen plotting backend and kind.

    Call syntax DataFrame.plot([x, y, kind, ax, ....])

  • Plot filled areas to emphasize magnitude across an ordered axis.

    Call syntax DataFrame.plot.area([x, y, stacked])

  • Draw vertical bars for category comparisons.

    Call syntax DataFrame.plot.bar([x, y, color])

  • Draw horizontal bars, useful when category labels are long.

    Call syntax DataFrame.plot.barh([x, y, color])

  • Draw box plots to compare medians, quartiles and spread.

    Call syntax DataFrame.plot.box([by])

  • Plot a smooth estimate of the density of numeric values.

    Call syntax DataFrame.plot.density([bw_method, ind, weights])

  • Count or summarize nearby x–y observations in hexagonal cells.

    Call syntax DataFrame.plot.hexbin(x, y[, C, ...])

  • Draw histograms to show how numeric observations are distributed across bins.

    Call syntax DataFrame.plot.hist([by, bins])

  • Plot a kernel density estimate of numeric data.

    Call syntax DataFrame.plot.kde([bw_method, ind, weights])

  • Connect observations in their existing order with a line.

    Call syntax DataFrame.plot.line([x, y, color])

  • Draw slices with areas proportional to category values.

    Call syntax DataFrame.plot.pie([y])

  • Plot pairs of values as points to show their relationship.

    Call syntax DataFrame.plot.scatter(x, y[, s, c])

  • Remove a labeled entry and return it. A DataFrame returns the removed column.

    Call syntax DataFrame.pop(item)

  • Raise each value to its corresponding exponent.

    Call syntax DataFrame.pow(other[, axis, level, fill_value])

  • Multiply values together along the selected axis, group or window.

    Call syntax DataFrame.prod(*[, axis, skipna, ...])

  • Use prod to multiply values together.

    Call syntax DataFrame.product(*[, axis, skipna, ...])

  • Estimate the value at a specified fraction of the sorted distribution.

    Call syntax DataFrame.quantile([q, axis, numeric_only, ...])

  • Filter DataFrame rows using a trusted expression over columns or the index. Use @name to reference a local variable.

    Call syntax DataFrame.query(expr, *[, parser, engine, ...])

    Example
    orders.query("units >= 5")
  • Add using the supplied value as the left operand.

    Call syntax DataFrame.radd(other[, axis, level, fill_value])

  • Assign positions in sorted order and choose how to handle ties.

    Call syntax DataFrame.rank([axis, method, numeric_only, ...])

  • Divide the supplied value by the object's values with true division.

    Call syntax DataFrame.rdiv(other[, axis, level, fill_value])

  • Conform to supplied labels and fill positions where those labels did not previously exist.

    Call syntax DataFrame.reindex([labels, index, columns, ...])

  • Conform to the labels on another pandas object.

    Call syntax DataFrame.reindex_like(other[, method, ...])

  • Change labels using a mapping or callable. A Series can also receive a new name.

    Call syntax DataFrame.rename([mapper, index, columns, ...])

    Example
    orders.rename(columns={"units": "quantity"})
  • Change the name of an axis while preserving its labels.

    Call syntax DataFrame.rename_axis([mapper, index, ...])

  • Rearrange levels of a hierarchical index.

    Call syntax DataFrame.reorder_levels(order[, axis])

  • Substitute values using a mapping or match pattern. Enable regex matching where needed.

    Call syntax DataFrame.replace([to_replace, value, ...])

    Example
    orders.replace({"team": {"North": "N"}})
  • Create time bins from a datetime-like axis, then reduce, fill or upsample within those bins.

    Call syntax DataFrame.resample(rule[, closed, label, ...])

  • Restore a default positional index. Existing index labels can become columns.

    Call syntax DataFrame.reset_index([level, drop, ...])

    Example
    orders.set_index("team").reset_index()
  • Use the supplied value as the numerator in floor division.

    Call syntax DataFrame.rfloordiv(other[, axis, level, ...])

  • Compute the supplied value modulo the object's values.

    Call syntax DataFrame.rmod(other[, axis, level, fill_value])

  • Multiply using the supplied value as the left operand.

    Call syntax DataFrame.rmul(other[, axis, level, fill_value])

  • Build a moving window defined by an observation count, time span or custom indexer.

    Call syntax DataFrame.rolling(window[, min_periods, ...])

  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax DataFrame.round([decimals])

  • Use the supplied values as bases and the object's values as exponents.

    Call syntax DataFrame.rpow(other[, axis, level, fill_value])

  • Subtract the object's values from the supplied value.

    Call syntax DataFrame.rsub(other[, axis, level, fill_value])

  • Use the supplied value as the numerator in true division.

    Call syntax DataFrame.rtruediv(other[, axis, level, ...])

  • Randomly select rows, entries or columns. Set random_state for repeatable results.

    Call syntax DataFrame.sample([n, frac, replace, ...])

    Example
    orders.sample(n=2, random_state=7)
  • Build a DataFrame from selected columns and computed columns supplied as expressions or keyword callables.

    Call syntax DataFrame.select(*args, **kwargs)

  • Keep or exclude columns based on their dtypes.

    Call syntax DataFrame.select_dtypes([include, exclude])

    Example
    orders.select_dtypes(include="number")
  • Calculate the standard error of the mean for the selected data.

    Call syntax DataFrame.sem(*[, axis, skipna, ddof, ...])

  • Replace all labels on an axis with a new collection of equal length.

    Call syntax DataFrame.set_axis(labels, *[, axis, copy])

  • Get an object with changed flags, such as whether duplicate labels are allowed.

    Call syntax DataFrame.set_flags(*[, copy, ...])

  • Use columns or supplied arrays as the row index.

    Call syntax DataFrame.set_index(keys, *[, drop, append, ...])

    Example
    orders.set_index("day")
  • pandas.DataFrame.shapeproperty

    Get a pair containing the number of rows and columns.

    Example
    orders.shape
  • Move values by a positional offset. With a time frequency, move the labels instead.

    Call syntax DataFrame.shift([periods, freq, axis, ...])

  • pandas.DataFrame.sizeproperty

    Get the number of cells, including cells holding missing values.

  • Estimate how asymmetric a numeric distribution is.

    Call syntax DataFrame.skew(*[, axis, skipna, numeric_only])

  • Order rows or columns by their labels.

    Call syntax DataFrame.sort_index(*[, axis, level, ...])

    Example
    orders.sort_index(ascending=False)
  • Order items by one or more data values, controlling missing-value placement.

    Call syntax DataFrame.sort_values(by, *[, axis, ...])

    Example
    orders.sort_values("units", ascending=False, na_position="last")
  • pandas.DataFrame.sparse.densityattribute
  • Create a sparse pandas object from a SciPy sparse matrix.

    Call syntax DataFrame.sparse.from_spmatrix(data[, ...])

  • Convert sparse pandas data to SciPy coordinate format.

    Call syntax DataFrame.sparse.to_coo()

  • Materialize every value of a sparse object in a dense result.

    Call syntax DataFrame.sparse.to_dense()

  • Collapse axes of length one, yielding a lower-dimensional object or scalar where possible.

    Call syntax DataFrame.squeeze([axis])

  • Move column levels into the row index.

    Call syntax DataFrame.stack([level, dropna, sort, ...])

    Example
    orders.set_index("day")[["units"]].stack()
  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax DataFrame.std(*[, axis, skipna, ddof, ...])

  • pandas.DataFrame.styleproperty

    Get a Styler for formatting values for display without changing their stored types.

  • Subtract corresponding values after any applicable label alignment.

    Call syntax DataFrame.sub(other[, axis, level, fill_value])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax DataFrame.sum(*[, axis, skipna, ...])

  • Exchange two levels of a hierarchical index.

    Call syntax DataFrame.swaplevel([i, j, axis])

  • pandas.DataFrame.Tproperty

    Get the transposed table with rows and columns exchanged.

  • Get the last n entries or rows. On GroupBy the limit applies per group.

    Call syntax DataFrame.tail([n])

    Example
    orders.tail(2)
  • Select values by integer position in the order supplied.

    Call syntax DataFrame.take(indices[, axis])

  • Copy the object's textual table representation to the system clipboard.

    Call syntax DataFrame.to_clipboard(*[, excel, sep])

  • Write delimited text or return it as a string. Use index=False when row labels should be excluded.

    Call syntax DataFrame.to_csv([path_or_buf, sep, na_rep, ...])

    Example
    orders.to_csv(index=False)
  • Convert values to a Python mapping. DataFrame orient controls the shape of that mapping.

    Call syntax DataFrame.to_dict([orient, into, index])

  • Write the receiver to an Excel sheet. Use ExcelWriter to manage multiple sheets in one workbook.

    Call syntax DataFrame.to_excel(excel_writer, *[, ...])

  • Write tabular data in the Feather columnar format.

    Call syntax DataFrame.to_feather(path, **kwargs)

  • Save pandas data under a key in an HDF5 store.

    Call syntax DataFrame.to_hdf(path_or_buf, *, key[, ...])

  • Render the receiver as an HTML table. A Styler includes applicable styling rules in its output.

    Call syntax DataFrame.to_html([buf, columns, col_space, ...])

  • Serialize the object to JSON. Choose orient for the layout and lines for line-delimited records where supported.

    Call syntax DataFrame.to_json([path_or_buf, orient, ...])

  • Produce a LaTeX table representation of the receiver.

    Call syntax DataFrame.to_latex([buf, columns, header, ...])

  • Render a table as Markdown text.

    Call syntax DataFrame.to_markdown([buf, mode, index, ...])

  • Convert values to a NumPy array. Mixed columns may require a common dtype.

    Call syntax DataFrame.to_numpy([dtype, copy, na_value])

  • Write a DataFrame in the ORC columnar format.

    Call syntax DataFrame.to_orc([path, engine, index, ...])

  • Write a DataFrame in the Parquet columnar format. Set compression or partition_cols where needed.

    Call syntax DataFrame.to_parquet([path, engine, ...])

  • Convert the datetime index or selected axis to a PeriodIndex at the requested frequency.

    Call syntax DataFrame.to_period([freq, axis, copy])

  • Serialize a Python object into a pickle file for later restoration.

    Call syntax DataFrame.to_pickle(path, *[, compression, ...])

  • Get a NumPy record array with named fields.

    Call syntax DataFrame.to_records([index, column_dtypes, ...])

  • Write tabular data to a SQL table. Use if_exists to control what happens when the table is already present.

    Call syntax DataFrame.to_sql(name, con, *[, schema, ...])

  • Write a DataFrame as a Stata data file.

    Call syntax DataFrame.to_stata(path, *[, convert_dates, ...])

  • Return a human-readable textual representation or write it to the supplied buffer.

    Call syntax DataFrame.to_string([buf, columns, ...])

  • Convert the PeriodIndex on the selected axis to timestamps representing period starts or ends.

    Call syntax DataFrame.to_timestamp([freq, how, axis, copy])

  • Convert labeled pandas data to the corresponding xarray object.

    Call syntax DataFrame.to_xarray()

  • Apply an operation and retain compatibility with the input shape. GroupBy aligns the result with the original rows.

    Call syntax DataFrame.transform(func[, axis])

  • Exchange row and column axes on two-dimensional data.

    Call syntax DataFrame.transpose(*args[, copy])

  • Divide corresponding values with true division.

    Call syntax DataFrame.truediv(other[, axis, level, ...])

  • Keep labels within specified before and after bounds on a sorted axis.

    Call syntax DataFrame.truncate([before, after, axis, copy])

  • Express timezone-aware data in another zone while keeping the same instants.

    Call syntax DataFrame.tz_convert(tz[, axis, level, copy])

  • Assign a timezone to naive datetimes or remove it while keeping local clock values.

    Call syntax DataFrame.tz_localize(tz[, axis, level, ...])

  • Move an index level into the columns.

    Call syntax DataFrame.unstack([level, fill_value, sort])

  • Modify the caller with nonmissing values aligned from another object.

    Call syntax DataFrame.update(other[, join, overwrite, ...])

  • Count occurrences of each value or row combination. Set normalize for proportions and dropna=False to keep missing values.

    Call syntax DataFrame.value_counts([subset, normalize, ...])

  • pandas.DataFrame.valuesproperty
  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax DataFrame.var(*[, axis, skipna, ddof, ...])

  • Keep values where a condition is true and replace the rest with the supplied alternative.

    Call syntax DataFrame.where(cond[, other, inplace, ...])

  • Select a cross-section by a label, optionally within one level of a hierarchical index.

    Call syntax DataFrame.xs(key[, axis, level, drop_level])

  • pandas.Flagsclass
  • pandas.MultiIndexclass
Series and accessors (342)
  • pandas.DataFrame.sparseaccessor

    Get the accessor for operations on sparse values.

  • pandas.Index.straccessor

    Get the accessor for vectorized operations on strings and string-like data.

  • pandas.Seriesclass
  • Expose values through NumPy's array protocol.

    Call syntax Series.__array__([dtype, copy])

  • Implement ~ for the receiver. For a boolean mask, flip true and false.

    Call syntax Series.__invert__()

  • Iterate through the values in Series order.

    Call syntax Series.__iter__()

  • Take the absolute value of each numeric element.

    Call syntax Series.abs()

  • Add corresponding values. Labeled pandas operands align by their labels.

    Call syntax Series.add(other[, level, fill_value, axis])

  • Prepend text to labels on the chosen axis.

    Call syntax Series.add_prefix(prefix[, axis])

  • Append text to labels on the chosen axis.

    Call syntax Series.add_suffix(suffix[, axis])

  • Summarize values with named operations or callables. The result shape depends on the operations and object.

    Call syntax Series.agg([func, axis])

  • Summarize values with one or more operations using the same interface as agg.

    Call syntax Series.aggregate([func, axis])

  • Return two objects with compatible labels. Set join to choose which labels to retain.

    Call syntax Series.align(other[, join, axis, level, ...])

  • Test whether every value along the selected axis or group evaluates to true.

    Call syntax Series.all(*[, axis, bool_only, skipna])

  • Test whether at least one value along the selected axis or group evaluates to true.

    Call syntax Series.any(*[, axis, bool_only, skipna])

  • Run a callable over the units of the object, such as rows, columns, groups, or windows. The receiver controls which units it passes to the callable.

    Call syntax Series.apply(func[, args, by_row])

  • Get the integer position of the first maximum value.

    Call syntax Series.argmax([axis, skipna])

  • Get the integer position of the first minimum value.

    Call syntax Series.argmin([axis, skipna])

  • Get positions describing the order that sorts the values.

    Call syntax Series.argsort([axis, kind, order, stable])

  • pandas.Series.arrayproperty
  • Conform the object to a frequency. Use resample to aggregate observations into time bins.

    Call syntax Series.asfreq(freq[, method, how, ...])

  • Look up the last usable observation at or before the requested label.

    Call syntax Series.asof(where[, subset])

  • Convert to another dtype. A DataFrame accepts a mapping to choose conversions column by column.

    Call syntax Series.astype(dtype[, copy, errors])

  • pandas.Series.atproperty

    Read or set a single Series value by its index label.

  • Select observations at one clock time from a datetime-indexed object.

    Call syntax Series.at_time(time[, asof, axis])

  • pandas.Series.attrsproperty
  • Correlate a Series with its own lagged values using the specified number of periods.

    Call syntax Series.autocorr([lag])

  • Make a boolean mask for values inside an interval. Set inclusive to control which endpoints count.

    Call syntax Series.between(left, right[, inclusive])

    Example
    orders["units"].between(4, 7, inclusive="both")
  • Select observations within a clock-time range, independent of their calendar dates.

    Call syntax Series.between_time(start_time, end_time[, ...])

  • Fill a gap using the next available value along the selected direction.

    Call syntax Series.bfill(*[, axis, inplace, limit, ...])

  • Choose replacements using a sequence of condition–value pairs. If multiple conditions match, the first match wins.

    Call syntax Series.case_when(caselist)

  • pandas.Series.cataccessor

    Get the accessor for categorical data and its metadata.

  • Extend the list of permitted categories without changing observations.

    Call syntax Series.cat.add_categories(new_categories)

  • Mark categories as ordered so comparisons can use their declared order.

    Call syntax Series.cat.as_ordered()

  • Mark categories as unordered, preserving their labels.

    Call syntax Series.cat.as_unordered()

  • pandas.Series.cat.categoriesattribute

    Get the full set of allowed category labels, including those unused by current observations.

  • pandas.Series.cat.codesattribute

    Get integer positions in the category list. Missing values are represented with -1.

  • pandas.Series.cat.orderedattribute

    Check whether the declared category order is meaningful for comparisons.

  • Remove selected categories and mark observations using them as missing.

    Call syntax Series.cat.remove_categories(removals)

  • Remove declared categories that do not occur in the data.

    Call syntax Series.cat.remove_unused_categories()

  • Change the labels of categories and preserve the underlying assignments.

    Call syntax Series.cat.rename_categories(new_categories)

  • Set the order of existing categories without changing which category each value belongs to.

    Call syntax Series.cat.reorder_categories(new_categories)

  • Replace the permitted categories. Observations outside the new set can become missing.

    Call syntax Series.cat.set_categories(new_categories[, ...])

  • Clamp values to lower or upper limits, leaving values within the limits unchanged.

    Call syntax Series.clip([lower, upper, axis, inplace])

  • Combine aligned objects using a callable. DataFrame passes columns to the callable and Series passes individual values.

    Call syntax Series.combine(other, func[, fill_value])

  • Fill missing positions from a second aligned object while keeping existing valid values.

    Call syntax Series.combine_first(other)

  • Display the differences between two equally labeled objects side by side.

    Call syntax Series.compare(other[, align_axis, ...])

  • Infer dtypes with support for missing values, such as nullable integers or strings.

    Call syntax Series.convert_dtypes([infer_objects, ...])

  • Make a copy of the receiver. For an HDFStore, copy stored data to a different file.

    Call syntax Series.copy([deep])

  • Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.

    Call syntax Series.corr(other[, method, min_periods])

  • Count nonmissing values along the selected axis or within each group or window.

    Call syntax Series.count()

  • Estimate how pairs of numeric inputs vary together from aligned observations.

    Call syntax Series.cov(other[, min_periods, ddof])

  • Track the largest value encountered up to each position.

    Call syntax Series.cummax([axis, skipna])

  • Track the smallest value encountered up to each position.

    Call syntax Series.cummin([axis, skipna])

  • Keep a running product in observation order.

    Call syntax Series.cumprod([axis, skipna])

  • Keep a running total in observation order.

    Call syntax Series.cumsum([axis, skipna])

    Example
    orders["units"].cumsum()
  • Summarize values with statistics appropriate to their dtype, such as quartiles for numbers or frequencies for categories.

    Call syntax Series.describe([percentiles, include, exclude])

  • Subtract an earlier observation from the current one. Change periods to adjust the distance.

    Call syntax Series.diff([periods])

    Example
    orders["units"].diff()
  • Divide corresponding values with true division, preserving fractional quotients.

    Call syntax Series.div(other[, level, fill_value, axis])

  • Calculate both element-wise floor quotients and remainders.

    Call syntax Series.divmod(other[, level, fill_value, axis])

  • Compute a dot product or matrix multiplication, aligning shared labels where applicable.

    Call syntax Series.dot(other)

  • Remove rows or columns by label. Specify columns= to make column removal explicit.

    Call syntax Series.drop([labels, axis, index, columns, ...])

  • Keep one occurrence of duplicate values or rows by default. Use keep to choose which occurrences survive.

    Call syntax Series.drop_duplicates(*[, keep, inplace, ...])

  • Remove one or more levels of a hierarchical index.

    Call syntax Series.droplevel(level[, axis])

  • Drop entries with missing values. For DataFrames, subset restricts the columns considered when dropping rows.

    Call syntax Series.dropna(*[, axis, inplace, how, ...])

  • pandas.Series.dtaccessor

    Get the accessor for datetime, timedelta or period properties and methods.

  • Change the storage unit of time values, subject to precision and rounding rules.

    Call syntax Series.dt.as_unit(unit[, round_ok])

  • Round timestamps or durations up to a frequency boundary.

    Call syntax Series.dt.ceil(freq[, ambiguous, nonexistent])

  • pandas.Series.dt.componentsattribute
  • pandas.Series.dt.dateattribute

    Extract each calendar date as a standard-library date object.

  • pandas.Series.dt.dayattribute

    Get the day of the month from each date.

  • Get weekday names, optionally using a specified locale.

    Call syntax Series.dt.day_name([locale])

  • pandas.Series.dt.day_of_weekattribute
  • pandas.Series.dt.day_of_yearattribute
  • pandas.Series.dt.dayofweekattribute

    Get the weekday number, where Monday is 0 and Sunday is 6.

  • pandas.Series.dt.dayofyearattribute
  • pandas.Series.dt.daysattribute
  • pandas.Series.dt.days_in_monthattribute
  • pandas.Series.dt.daysinmonthattribute
  • pandas.Series.dt.end_timeattribute
  • Round timestamps or durations down to a frequency boundary.

    Call syntax Series.dt.floor(freq[, ambiguous, nonexistent])

  • pandas.Series.dt.freqattribute
  • pandas.Series.dt.hourattribute
  • pandas.Series.dt.is_leap_yearattribute
  • pandas.Series.dt.is_month_endattribute
  • pandas.Series.dt.is_month_startattribute
  • pandas.Series.dt.is_quarter_endattribute
  • pandas.Series.dt.is_quarter_startattribute
  • pandas.Series.dt.is_year_endattribute
  • pandas.Series.dt.is_year_startattribute
  • Get the ISO week-based year, week number and day of the week.

    Call syntax Series.dt.isocalendar()

  • pandas.Series.dt.microsecondattribute
  • pandas.Series.dt.microsecondsattribute
  • pandas.Series.dt.minuteattribute
  • pandas.Series.dt.monthattribute

    Get the calendar month number from 1 to 12.

  • Get month names, optionally using a specified locale.

    Call syntax Series.dt.month_name([locale])

  • pandas.Series.dt.nanosecondattribute
  • pandas.Series.dt.nanosecondsattribute
  • Set the clock time to midnight while preserving the calendar date and timezone.

    Call syntax Series.dt.normalize()

  • pandas.Series.dt.quarterattribute
  • pandas.Series.dt.qyearattribute
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax Series.dt.round(freq[, ambiguous, nonexistent])

  • pandas.Series.dt.secondattribute
  • pandas.Series.dt.secondsattribute
  • pandas.Series.dt.start_timeattribute
  • Format a time value using strftime directives such as %Y-%m-%d. Period.strftime is deprecated in pandas 3.1.1.

    Call syntax Series.dt.strftime(date_format)

    Example
    orders["day"].dt.strftime("%Y-%m")
  • pandas.Series.dt.timeattribute
  • pandas.Series.dt.timetzattribute
  • Convert the datetime values to periods at the supplied frequency.

    Call syntax Series.dt.to_period([freq])

  • Get a Series of standard-library datetime objects from the timestamp values.

    Call syntax Series.dt.to_pydatetime()

  • Convert pandas durations to standard-library timedelta objects.

    Call syntax Series.dt.to_pytimedelta()

  • Express a duration as seconds, including its fractional portion.

    Call syntax Series.dt.total_seconds()

  • pandas.Series.dt.tzattribute
  • Express timezone-aware data in another zone while keeping the same instants.

    Call syntax Series.dt.tz_convert(tz)

  • Assign a timezone to naive datetimes or remove it while keeping local clock values.

    Call syntax Series.dt.tz_localize(tz[, ambiguous, ...])

  • pandas.Series.dt.unitattribute
  • pandas.Series.dt.weekdayattribute
  • pandas.Series.dt.yearattribute

    Get the calendar year from each datetime value.

  • pandas.Series.dtypeproperty

    Get the single dtype used by the Series.

  • pandas.Series.dtypesproperty
  • Mark repeated values or rows with a boolean mask. Use keep=False to mark every member of a duplicate set.

    Call syntax Series.duplicated([keep])

  • pandas.Series.emptyproperty

    Check whether the Series has zero entries.

  • Compare corresponding values for equality after any applicable label alignment.

    Call syntax Series.eq(other[, level, fill_value, axis])

  • Check whether two objects have compatible shapes and the same contents, including missing values in the same locations.

    Call syntax Series.equals(other)

  • Build an exponentially weighted window for calculations that emphasize recent observations.

    Call syntax Series.ewm([com, span, halflife, alpha, ...])

  • Build a window that grows from the start through each observation.

    Call syntax Series.expanding([min_periods, method])

  • Expand list-like cells into rows, repeating original row labels as needed.

    Call syntax Series.explode([ignore_index])

    Example
    pd.Series([["A", "B"], ["C"]]).explode()
  • Encode distinct values as integers and return the codes alongside the corresponding unique values.

    Call syntax Series.factorize([sort, use_na_sentinel])

  • Fill gaps with the most recent available value in the selected direction.

    Call syntax Series.ffill(*[, axis, inplace, limit, ...])

  • Replace missing values with supplied replacements, such as a scalar or values aligned by label.

    Call syntax Series.fillna(value, *[, axis, inplace, limit])

  • Select by labels on a DataFrame or Series. On GroupBy keep groups passing a boolean callable.

    Call syntax Series.filter([arg, like, regex, axis, ...])

  • Find the first index label containing a usable value.

    Call syntax Series.first_valid_index()

  • pandas.Series.flagsproperty
  • Divide corresponding values and round each quotient down.

    Call syntax Series.floordiv(other[, level, fill_value, axis])

  • Build a Series from an Arrow-compatible array-like object.

    Call syntax Series.from_arrow(data)

  • Compare corresponding values using greater-than-or-equal-to.

    Call syntax Series.ge(other[, level, fill_value, axis])

  • Retrieve an object by key. A Series or DataFrame can also return a supplied default for an unknown key.

    Call syntax Series.get(key[, default])

  • Split an object by keys to aggregate, transform, or filter each group.

    Call syntax Series.groupby([by, level, as_index, sort, ...])

  • Compare corresponding values using greater-than.

    Call syntax Series.gt(other[, level, fill_value, axis])

  • pandas.Series.hasnansproperty
  • Get the first n rows or values. On GroupBy the limit applies within each group.

    Call syntax Series.head([n])

  • Draw histograms to show how numeric observations are distributed across bins.

    Call syntax Series.hist([by, ax, grid, xlabelsize, ...])

  • pandas.Series.iatproperty

    Read or set a single Series value by its integer position.

  • Get the label of the first maximum along the selected axis or within a group.

    Call syntax Series.idxmax([axis, skipna])

  • Get the label of the first minimum along the selected axis or within a group.

    Call syntax Series.idxmin([axis, skipna])

  • pandas.Series.ilocproperty

    Select or set Series values by zero-based integer position.

  • pandas.Series.indexattribute

    Get the labels attached to the Series values.

  • Try a soft dtype conversion on object data without forcing strings to parse as numbers.

    Call syntax Series.infer_objects([copy])

  • Print a Series summary with its index, dtype, non-null count and memory use.

    Call syntax Series.info([verbose, buf, max_cols, ...])

  • Estimate missing values from neighboring observations using a selected interpolation method.

    Call syntax Series.interpolate([method, axis, limit, ...])

  • pandas.Series.is_monotonic_decreasingproperty
  • pandas.Series.is_monotonic_increasingproperty
  • pandas.Series.is_uniqueproperty
  • Test membership and return a boolean result for each value.

    Call syntax Series.isin(values)

    Example
    orders["team"].isin(["North"])
  • Identify missing values. The result is a boolean for a scalar and a boolean mask for an array-like input.

    Call syntax Series.isna()

  • Use isna to identify missing values.

    Call syntax Series.isnull()

  • Extract a scalar. For a Series, Index or array, the default extraction requires exactly one element.

    Call syntax Series.item()

  • Iterate through index–value pairs in Series order.

    Call syntax Series.items()

  • Get the Series index.

    Call syntax Series.keys()

  • Estimate excess kurtosis, a statistic sensitive to heavy tails in a distribution.

    Call syntax Series.kurt(*[, axis, skipna, numeric_only])

  • Use the same excess kurtosis calculation as kurt.

    Call syntax Series.kurtosis(*[, axis, skipna, numeric_only])

  • Find the last index label containing a usable value.

    Call syntax Series.last_valid_index()

  • Compare corresponding values using less-than-or-equal-to.

    Call syntax Series.le(other[, level, fill_value, axis])

  • Implement bracket indexing to select a value or subset.

    Call syntax Series.list.__getitem__(key)

  • Expand each Arrow list into individual values, repeating the source index label for each child.

    Call syntax Series.list.flatten()

  • Measure the length of each element, such as the number of characters in each string.

    Call syntax Series.list.len()

  • pandas.Series.locproperty

    Select or set Series values by label or a boolean mask.

  • Compare corresponding values using less-than.

    Call syntax Series.lt(other[, level, fill_value, axis])

  • Map each Series value through a callable, dictionary or Series lookup.

    Call syntax Series.map([func, na_action, engine])

    Example
    orders["team"].map({"North": "N", "South": "S"})
  • Replace values wherever the condition is true.

    Call syntax Series.mask(cond[, other, inplace, axis, level])

  • Find the largest value in the selection, group or window.

    Call syntax Series.max(*[, axis, skipna, numeric_only])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax Series.mean(*[, axis, skipna, numeric_only])

  • Find the middle of the sorted values, averaging the central pair when there are two.

    Call syntax Series.median(*[, axis, skipna, numeric_only])

  • Report bytes accounted for by pandas. For object data, deep=True includes more of the referenced values.

    Call syntax Series.memory_usage([index, deep])

  • Find the smallest value in the selection, group or window.

    Call syntax Series.min(*[, axis, skipna, numeric_only])

  • Compute the remainder for each pair of values.

    Call syntax Series.mod(other[, level, fill_value, axis])

  • Find the value or values tied for highest frequency.

    Call syntax Series.mode([dropna])

  • Multiply corresponding values after any applicable label alignment.

    Call syntax Series.mul(other[, level, fill_value, axis])

  • pandas.Series.nameproperty

    Get the Series name, often inherited from the DataFrame column selected.

  • pandas.Series.nbytesproperty
  • pandas.Series.ndimproperty
  • Compare corresponding values for inequality.

    Call syntax Series.ne(other[, level, fill_value, axis])

  • Get the n largest observations.

    Call syntax Series.nlargest([n, keep])

  • Identify present values by inverting the isna result.

    Call syntax Series.notna()

  • Use notna to identify present values.

    Call syntax Series.notnull()

  • Get the n smallest observations.

    Call syntax Series.nsmallest([n, keep])

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax Series.nunique([dropna])

  • Compute fractional change from an earlier value. Multiply by 100 to express it as a percentage.

    Call syntax Series.pct_change([periods, fill_method, freq])

  • Pass the current object to a callable while staying in a method chain.

    Call syntax Series.pipe(func, *args, **kwargs)

  • Create a chart using the chosen plotting backend and kind.

    Call syntax Series.plot([kind, ax, figsize, ....])

  • Plot filled areas to emphasize magnitude across an ordered axis.

    Call syntax Series.plot.area([x, y, stacked])

  • Draw vertical bars for category comparisons.

    Call syntax Series.plot.bar([x, y, color])

  • Draw horizontal bars, useful when category labels are long.

    Call syntax Series.plot.barh([x, y, color])

  • Draw box plots to compare medians, quartiles and spread.

    Call syntax Series.plot.box([by])

  • Plot a smooth estimate of the density of numeric values.

    Call syntax Series.plot.density([bw_method, ind, weights])

  • Draw histograms to show how numeric observations are distributed across bins.

    Call syntax Series.plot.hist([by, bins])

  • Plot a kernel density estimate of numeric data.

    Call syntax Series.plot.kde([bw_method, ind, weights])

  • Connect observations in their existing order with a line.

    Call syntax Series.plot.line([x, y, color])

  • Draw slices with areas proportional to category values.

    Call syntax Series.plot.pie([y])

  • Remove a labeled entry and return it. A DataFrame returns the removed column.

    Call syntax Series.pop(item)

  • Raise each value to its corresponding exponent.

    Call syntax Series.pow(other[, level, fill_value, axis])

  • Multiply values together along the selected axis, group or window.

    Call syntax Series.prod(*[, axis, skipna, numeric_only, ...])

  • Use prod to multiply values together.

    Call syntax Series.product(*[, axis, skipna, ...])

  • Estimate the value at a specified fraction of the sorted distribution.

    Call syntax Series.quantile([q, interpolation])

  • Add using the supplied value as the left operand.

    Call syntax Series.radd(other[, level, fill_value, axis])

  • Assign positions in sorted order and choose how to handle ties.

    Call syntax Series.rank([axis, method, numeric_only, ...])

    Example
    orders["units"].rank(method="dense", ascending=False)
  • Divide the supplied value by the object's values with true division.

    Call syntax Series.rdiv(other[, level, fill_value, axis])

  • Get both quotient and remainder with the supplied values as the left operands.

    Call syntax Series.rdivmod(other[, level, fill_value, axis])

  • Conform to supplied labels and fill positions where those labels did not previously exist.

    Call syntax Series.reindex([index, axis, method, copy, ...])

  • Conform to the labels on another pandas object.

    Call syntax Series.reindex_like(other[, method, copy, ...])

  • Change labels using a mapping or callable. A Series can also receive a new name.

    Call syntax Series.rename([index, axis, copy, inplace, ...])

  • Change the name of an axis while preserving its labels.

    Call syntax Series.rename_axis([mapper, index, axis, ...])

  • Rearrange levels of a hierarchical index.

    Call syntax Series.reorder_levels(order)

  • Repeat each value the given number of times. String repeat repeats the text within each element.

    Call syntax Series.repeat(repeats[, axis])

  • Substitute values using a mapping or match pattern. Enable regex matching where needed.

    Call syntax Series.replace([to_replace, value, inplace, ...])

  • Create time bins from a datetime-like axis, then reduce, fill or upsample within those bins.

    Call syntax Series.resample(rule[, closed, label, ...])

    Example
    orders.set_index("day")["units"].resample("2D").sum(min_count=1)
  • Restore a default positional index. Existing index labels can become columns.

    Call syntax Series.reset_index([level, drop, name, ...])

  • Use the supplied value as the numerator in floor division.

    Call syntax Series.rfloordiv(other[, level, fill_value, ...])

  • Compute the supplied value modulo the object's values.

    Call syntax Series.rmod(other[, level, fill_value, axis])

  • Multiply using the supplied value as the left operand.

    Call syntax Series.rmul(other[, level, fill_value, axis])

  • Build a moving window defined by an observation count, time span or custom indexer.

    Call syntax Series.rolling(window[, min_periods, ...])

    Example
    orders["units"].rolling(window=2, min_periods=1).mean()
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax Series.round([decimals])

  • Use the supplied values as bases and the object's values as exponents.

    Call syntax Series.rpow(other[, level, fill_value, axis])

  • Subtract the object's values from the supplied value.

    Call syntax Series.rsub(other[, level, fill_value, axis])

  • Use the supplied value as the numerator in true division.

    Call syntax Series.rtruediv(other[, level, fill_value, axis])

  • Randomly select rows, entries or columns. Set random_state for repeatable results.

    Call syntax Series.sample([n, frac, replace, weights, ...])

  • Get the insertion positions that preserve the order of sorted data.

    Call syntax Series.searchsorted(value[, side, sorter])

  • Calculate the standard error of the mean for the selected data.

    Call syntax Series.sem(*[, axis, skipna, ddof, numeric_only])

  • Replace all labels on an axis with a new collection of equal length.

    Call syntax Series.set_axis(labels, *[, axis, copy])

  • Get an object with changed flags, such as whether duplicate labels are allowed.

    Call syntax Series.set_flags(*[, copy, ...])

  • pandas.Series.shapeproperty

    Get the number of entries as a one-element tuple.

  • Move values by a positional offset. With a time frequency, move the labels instead.

    Call syntax Series.shift([periods, freq, axis, ...])

    Example
    orders["units"].shift(1)
  • pandas.Series.sizeproperty

    Get the number of values, including missing values.

  • Estimate how asymmetric a numeric distribution is.

    Call syntax Series.skew(*[, axis, skipna, numeric_only])

  • Order rows or columns by their labels.

    Call syntax Series.sort_index(*[, axis, level, ...])

  • Order items by one or more data values, controlling missing-value placement.

    Call syntax Series.sort_values(*[, axis, ascending, ...])

  • pandas.Series.sparseaccessor

    Get the accessor for operations on sparse values.

  • pandas.Series.sparse.densityattribute
  • pandas.Series.sparse.fill_valueattribute
  • Construct a sparse Series from a SciPy coordinate matrix.

    Call syntax Series.sparse.from_coo(A[, dense_index])

  • pandas.Series.sparse.npointsattribute
  • pandas.Series.sparse.sp_valuesattribute
  • Convert sparse pandas data to SciPy coordinate format.

    Call syntax Series.sparse.to_coo([row_levels, ...])

  • Collapse axes of length one, yielding a lower-dimensional object or scalar where possible.

    Call syntax Series.squeeze([axis])

  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax Series.std(*[, axis, skipna, ddof, numeric_only])

  • pandas.Series.straccessor

    Get the accessor for vectorized operations on strings and string-like data.

  • Uppercase the initial character and lowercase the remaining text of each string.

    Call syntax Series.str.capitalize()

  • Normalize case more aggressively than lower, useful for case-insensitive comparisons across languages.

    Call syntax Series.str.casefold()

  • Join all strings into one value, or concatenate each row with aligned strings from other inputs.

    Call syntax Series.str.cat([others, sep, na_rep, join])

  • Pad both sides of each string to reach a minimum width.

    Call syntax Series.str.center(width[, fillchar])

  • Check whether each string contains a pattern. Set regex=False to match text literally.

    Call syntax Series.str.contains(pat[, case, flags, na, ...])

    Example
    orders["team"].str.contains("north", case=False, regex=False)
  • Count nonoverlapping regex matches separately in each string.

    Call syntax Series.str.count(pat[, flags])

    Example
    pd.Series(["A-A", "B-A"]).str.count("A")
  • Decode byte strings to text with a selected character encoding.

    Call syntax Series.str.decode(encoding[, errors, dtype])

  • Encode strings as bytes using a selected character encoding.

    Call syntax Series.str.encode(encoding[, errors])

  • Check whether each string ends with the supplied suffix or any of the supplied suffixes.

    Call syntax Series.str.endswith(pat[, na])

  • Capture groups from the first matching region in each string. Use parentheses in the regular expression to define output fields.

    Call syntax Series.str.extract(pat[, flags, expand])

  • Return captures for every pattern match, adding a level to distinguish matches within the same row.

    Call syntax Series.str.extractall(pat[, flags])

  • Get the first position of a substring, using -1 where it cannot be found.

    Call syntax Series.str.find(sub[, start, end])

  • Collect all nonoverlapping regex matches separately for each string.

    Call syntax Series.str.findall(pat[, flags])

  • Test whether a regular expression matches the whole string.

    Call syntax Series.str.fullmatch(pat[, case, flags, na])

  • Extract an element at the given position or key from each string or list-like value.

    Call syntax Series.str.get(i)

  • Split each string into tokens and build a separate indicator column for each token.

    Call syntax Series.str.get_dummies([sep, dtype])

  • Get the first position of a substring, raising for an unsuccessful lookup.

    Call syntax Series.str.index(sub[, start, end])

  • Test whether a string has at least one character and every character is a letter or a number.

    Call syntax Series.str.isalnum()

  • Test whether all characters are alphabetic, with empty strings returning false.

    Call syntax Series.str.isalpha()

  • Test whether all characters are in the ASCII character set.

    Call syntax Series.str.isascii()

  • Test whether every character in a nonempty string is a Unicode decimal digit.

    Call syntax Series.str.isdecimal()

  • Test whether every character in a nonempty string satisfies Unicode's digit rule.

    Call syntax Series.str.isdigit()

  • Test whether all cased characters are lowercase and at least one cased character is present.

    Call syntax Series.str.islower()

  • Test whether every character in a nonempty string has a Unicode numeric value.

    Call syntax Series.str.isnumeric()

  • Test whether a nonempty string consists only of whitespace.

    Call syntax Series.str.isspace()

  • Test whether a string follows Python's title-case rules.

    Call syntax Series.str.istitle()

  • Test whether all cased characters are uppercase and at least one cased character is present.

    Call syntax Series.str.isupper()

  • Combine the strings inside each list-like value with the specified separator.

    Call syntax Series.str.join(sep)

  • Measure the length of each element, such as the number of characters in each string.

    Call syntax Series.str.len()

  • Pad the right-hand side of strings so the text is left-aligned at the desired width.

    Call syntax Series.str.ljust(width[, fillchar])

  • Convert cased letters in each string to lowercase.

    Call syntax Series.str.lower()

    Example
    orders["team"].str.lower()
  • Remove whitespace or specified characters from the start of each string.

    Call syntax Series.str.lstrip([to_strip])

  • Test for a regex match at the beginning of each string.

    Call syntax Series.str.match(pat[, case, flags, na])

  • Normalize Unicode text to a selected form such as NFC so equivalent spellings can compare equally.

    Call syntax Series.str.normalize(form)

  • Pad each string to a minimum width on the requested side or sides.

    Call syntax Series.str.pad(width[, side, fillchar])

  • Split at the first separator, returning the portions before and after it plus the separator itself.

    Call syntax Series.str.partition([sep, expand])

  • Remove the specified prefix once where it is present.

    Call syntax Series.str.removeprefix(prefix)

  • Remove the specified suffix once where it is present.

    Call syntax Series.str.removesuffix(suffix)

  • Repeat each value the given number of times. String repeat repeats the text within each element.

    Call syntax Series.str.repeat(repeats)

  • Replace matching substrings inside each value. Set regex=True for regular-expression matching.

    Call syntax Series.str.replace(pat[, repl, n, case, ...])

    Example
    pd.Series(["A-01", "B-02"]).str.replace("-", "_", regex=False)
  • Get the last position of a substring, using -1 when there is no match.

    Call syntax Series.str.rfind(sub[, start, end])

  • Get the last position of a substring, raising for an unsuccessful lookup.

    Call syntax Series.str.rindex(sub[, start, end])

  • Pad the left-hand side of strings so the text is right-aligned.

    Call syntax Series.str.rjust(width[, fillchar])

  • Split into three parts at the last occurrence of a separator.

    Call syntax Series.str.rpartition([sep, expand])

  • Split strings from the right, useful when limiting the number of splits.

    Call syntax Series.str.rsplit([pat, n, expand])

  • Remove whitespace or specified characters from the end of each string.

    Call syntax Series.str.rstrip([to_strip])

  • Take a substring using Python-style start, stop and step positions.

    Call syntax Series.str.slice([start, stop, step])

  • Replace the section of each string between two character positions.

    Call syntax Series.str.slice_replace([start, stop, repl])

  • Split each string at a delimiter or pattern. Use expand=True to place parts in separate columns.

    Call syntax Series.str.split([pat, n, expand, regex])

    Example
    pd.Series(["A-01", "B-02"]).str.split("-", expand=True)
  • Check whether each string begins with the supplied prefix or any of the supplied prefixes.

    Call syntax Series.str.startswith(pat[, na])

  • Remove leading and trailing whitespace or the specified set of characters.

    Call syntax Series.str.strip([to_strip])

    Example
    pd.Series([" North ", "South\t"]).str.strip()
  • Convert lowercase letters to uppercase and uppercase letters to lowercase.

    Call syntax Series.str.swapcase()

  • Apply Python-style title casing to each string.

    Call syntax Series.str.title()

  • Use a translation mapping to replace or remove individual characters.

    Call syntax Series.str.translate(table)

  • Convert cased letters in each string to uppercase.

    Call syntax Series.str.upper()

  • Break long strings into lines at the specified display width.

    Call syntax Series.str.wrap(width[, expand_tabs, ...])

  • Pad the left side of strings with zeroes to reach a minimum width.

    Call syntax Series.str.zfill(width)

  • pandas.Series.struct.dtypesattribute
  • Extract every field of an Arrow struct Series into its own DataFrame column.

    Call syntax Series.struct.explode()

  • Extract a named or positional field from an Arrow struct column.

    Call syntax Series.struct.field(name_or_index)

  • Subtract corresponding values after any applicable label alignment.

    Call syntax Series.sub(other[, level, fill_value, axis])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax Series.sum(*[, axis, skipna, numeric_only, ...])

  • Exchange two levels of a hierarchical index.

    Call syntax Series.swaplevel([i, j, copy])

  • pandas.Series.Tproperty
  • Get the last n entries or rows. On GroupBy the limit applies per group.

    Call syntax Series.tail([n])

  • Select values by integer position in the order supplied.

    Call syntax Series.take(indices[, axis])

  • Copy the object's textual table representation to the system clipboard.

    Call syntax Series.to_clipboard(*[, excel, sep])

  • Write delimited text or return it as a string. Use index=False when row labels should be excluded.

    Call syntax Series.to_csv([path_or_buf, sep, na_rep, ...])

  • Build a Python mapping from index labels to values.

    Call syntax Series.to_dict(*[, into])

  • Write the receiver to an Excel sheet. Use ExcelWriter to manage multiple sheets in one workbook.

    Call syntax Series.to_excel(excel_writer, *[, ...])

  • Turn a one-dimensional pandas object into a DataFrame.

    Call syntax Series.to_frame([name])

  • Save pandas data under a key in an HDF5 store.

    Call syntax Series.to_hdf(path_or_buf, *, key[, mode, ...])

  • Serialize the object to JSON. Choose orient for the layout and lines for line-delimited records where supported.

    Call syntax Series.to_json([path_or_buf, orient, ...])

  • Produce a LaTeX table representation of the receiver.

    Call syntax Series.to_latex([buf, columns, header, ...])

  • Collect the values in a native Python list.

    Call syntax Series.to_list()

  • Render a table as Markdown text.

    Call syntax Series.to_markdown([buf, mode, index, ...])

  • Convert values to a NumPy array. Mixed columns may require a common dtype.

    Call syntax Series.to_numpy([dtype, copy, na_value])

  • Convert the Series DatetimeIndex to a PeriodIndex, preserving the Series values.

    Call syntax Series.to_period([freq, copy])

  • Serialize a Python object into a pickle file for later restoration.

    Call syntax Series.to_pickle(path, *[, compression, ...])

  • Write tabular data to a SQL table. Use if_exists to control what happens when the table is already present.

    Call syntax Series.to_sql(name, con, *[, schema, ...])

  • Return a human-readable textual representation or write it to the supplied buffer.

    Call syntax Series.to_string([buf, na_rep, ...])

  • Convert the Series PeriodIndex to timestamps representing period starts or ends.

    Call syntax Series.to_timestamp([freq, how, copy])

  • Convert labeled pandas data to the corresponding xarray object.

    Call syntax Series.to_xarray()

  • Apply an operation and retain compatibility with the input shape. GroupBy aligns the result with the original rows.

    Call syntax Series.transform(func[, axis])

  • Divide corresponding values with true division.

    Call syntax Series.truediv(other[, level, fill_value, axis])

  • Keep labels within specified before and after bounds on a sorted axis.

    Call syntax Series.truncate([before, after, axis, copy])

  • Express timezone-aware data in another zone while keeping the same instants.

    Call syntax Series.tz_convert(tz[, axis, level, copy])

  • Assign a timezone to naive datetimes or remove it while keeping local clock values.

    Call syntax Series.tz_localize(tz[, axis, level, copy, ...])

  • Get distinct values in encounter order without sorting.

    Call syntax Series.unique()

  • Move an index level into the columns.

    Call syntax Series.unstack([level, fill_value, sort])

  • Modify the caller with nonmissing values aligned from another object.

    Call syntax Series.update(other)

  • Count occurrences of each value or row combination. Set normalize for proportions and dropna=False to keep missing values.

    Call syntax Series.value_counts([normalize, sort, ...])

    Example
    orders["team"].value_counts(dropna=False)
  • pandas.Series.valuesproperty
  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax Series.var(*[, axis, skipna, ddof, numeric_only])

  • Keep values where a condition is true and replace the rest with the supplied alternative.

    Call syntax Series.where(cond[, other, inplace, axis, level])

    Example
    orders["units"].where(orders["units"].ge(5), other=0)
  • Select a cross-section by a label, optionally within one level of a hierarchical index.

    Call syntax Series.xs(key[, axis, level, drop_level])

GroupBy (128)
Index objects (253)
  • Check whether a value is acceptable as a single scalar rather than an array of values.

    Call syntax api.types.is_scalar(val)

  • pandas.Categoricalclass
  • pandas.CategoricalIndexclass
  • Extend the list of permitted categories without changing observations.

    Call syntax CategoricalIndex.add_categories(new_categories)

  • Concatenate index entries in order. The result can preserve a categorical dtype when the inputs are compatible.

    Call syntax CategoricalIndex.append(other)

  • Mark categories as ordered so comparisons can use their declared order.

    Call syntax CategoricalIndex.as_ordered()

  • Mark categories as unordered, preserving their labels.

    Call syntax CategoricalIndex.as_unordered()

  • pandas.CategoricalIndex.categoriesproperty
  • pandas.CategoricalIndex.codesproperty
  • Check whether two objects have compatible shapes and the same contents, including missing values in the same locations.

    Call syntax CategoricalIndex.equals(other)

  • Apply a substitution or callable to individual values. The receiver determines which mappers it supports.

    Call syntax CategoricalIndex.map(mapper[, na_action])

  • pandas.CategoricalIndex.orderedproperty
  • Remove selected categories and mark observations using them as missing.

    Call syntax CategoricalIndex.remove_categories(removals)

  • Remove declared categories that do not occur in the data.

    Call syntax CategoricalIndex.remove_unused_categories()

  • Change the labels of categories and preserve the underlying assignments.

    Call syntax CategoricalIndex.rename_categories(...)

  • Set the order of existing categories without changing which category each value belongs to.

    Call syntax CategoricalIndex.reorder_categories(...[, ...])

  • Replace the permitted categories. Observations outside the new set can become missing.

    Call syntax CategoricalIndex.set_categories(new_categories)

  • pandas.DatetimeIndexclass
  • Change the storage unit of time values, subject to precision and rounding rules.

    Call syntax DatetimeIndex.as_unit(unit)

  • pandas.DatetimeIndex.asi8property
  • Round timestamps or durations up to a frequency boundary.

    Call syntax DatetimeIndex.ceil(freq[, ambiguous, ...])

  • pandas.DatetimeIndex.dateproperty
  • pandas.DatetimeIndex.dayproperty
  • Get weekday names, optionally using a specified locale.

    Call syntax DatetimeIndex.day_name([locale])

  • pandas.DatetimeIndex.day_of_weekproperty
  • pandas.DatetimeIndex.day_of_yearproperty
  • pandas.DatetimeIndex.dayofweekproperty
  • pandas.DatetimeIndex.dayofyearproperty
  • Round timestamps or durations down to a frequency boundary.

    Call syntax DatetimeIndex.floor(freq[, ambiguous, ...])

  • pandas.DatetimeIndex.freqproperty
  • pandas.DatetimeIndex.freqstrproperty
  • pandas.DatetimeIndex.hourproperty
  • Find integer positions with the specified clock time in a DatetimeIndex.

    Call syntax DatetimeIndex.indexer_at_time(time[, asof])

  • Find integer positions between two clock times in a DatetimeIndex.

    Call syntax DatetimeIndex.indexer_between_time(...[, ...])

  • pandas.DatetimeIndex.inferred_freqattribute
  • pandas.DatetimeIndex.is_leap_yearproperty
  • pandas.DatetimeIndex.is_month_endproperty
  • pandas.DatetimeIndex.is_month_startproperty
  • pandas.DatetimeIndex.is_quarter_endproperty
  • pandas.DatetimeIndex.is_quarter_startproperty
  • pandas.DatetimeIndex.is_year_endproperty
  • pandas.DatetimeIndex.is_year_startproperty
  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax DatetimeIndex.mean(*[, skipna, axis])

  • pandas.DatetimeIndex.microsecondproperty
  • pandas.DatetimeIndex.minuteproperty
  • pandas.DatetimeIndex.monthproperty
  • Get month names, optionally using a specified locale.

    Call syntax DatetimeIndex.month_name([locale])

  • pandas.DatetimeIndex.nanosecondproperty
  • Set the clock time to midnight while preserving the calendar date and timezone.

    Call syntax DatetimeIndex.normalize()

  • pandas.DatetimeIndex.quarterproperty
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax DatetimeIndex.round(freq[, ambiguous, ...])

  • pandas.DatetimeIndex.secondproperty
  • Move each timestamp to the closest point on the specified frequency.

    Call syntax DatetimeIndex.snap([freq])

  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax DatetimeIndex.std([axis, dtype, out, ddof, ...])

  • Format a time value using strftime directives such as %Y-%m-%d. Period.strftime is deprecated in pandas 3.1.1.

    Call syntax DatetimeIndex.strftime(date_format)

  • pandas.DatetimeIndex.timeproperty
  • pandas.DatetimeIndex.timetzproperty
  • Turn a one-dimensional pandas object into a DataFrame.

    Call syntax DatetimeIndex.to_frame([index, name])

  • Express each date or timestamp as a Julian day number.

    Call syntax DatetimeIndex.to_julian_date()

  • Represent datetimes as periods at the selected frequency.

    Call syntax DatetimeIndex.to_period([freq])

  • Convert timestamps to standard-library datetime objects.

    Call syntax DatetimeIndex.to_pydatetime()

  • Build a Series from the index values, using the original labels by default.

    Call syntax DatetimeIndex.to_series([index, name])

  • pandas.DatetimeIndex.tzproperty
  • Express timezone-aware data in another zone while keeping the same instants.

    Call syntax DatetimeIndex.tz_convert(tz)

  • Assign a timezone to naive datetimes or remove it while keeping local clock values.

    Call syntax DatetimeIndex.tz_localize(tz[, ambiguous, ...])

  • pandas.DatetimeIndex.unitproperty
  • pandas.DatetimeIndex.weekdayproperty
  • pandas.DatetimeIndex.yearproperty
  • pandas.Indexclass
  • Test whether every value along the selected axis or group evaluates to true.

    Call syntax Index.all(*args, **kwargs)

  • Test whether at least one value along the selected axis or group evaluates to true.

    Call syntax Index.any(*args, **kwargs)

  • Concatenate this index with one or more indexes in order, preserving repeated labels.

    Call syntax Index.append(other)

  • Get the integer position of the first maximum value.

    Call syntax Index.argmax([axis, skipna])

  • Get the integer position of the first minimum value.

    Call syntax Index.argmin([axis, skipna])

  • Get positions describing the order that sorts the values.

    Call syntax Index.argsort(*args, **kwargs)

  • pandas.Index.arrayattribute
  • Look up the last usable observation at or before the requested label.

    Call syntax Index.asof(label)

  • For each query, find the position of the last eligible value at or before it.

    Call syntax Index.asof_locs(where, mask)

  • Convert to another dtype. A DataFrame accepts a mapping to choose conversions column by column.

    Call syntax Index.astype(dtype[, copy])

  • Make a copy of the receiver. For an HDFStore, copy stored data to a different file.

    Call syntax Index.copy([name, deep])

  • Remove index entries at the specified integer positions.

    Call syntax Index.delete(loc)

  • Get the labels in this index that are absent from the other collection.

    Call syntax Index.difference(other[, sort])

  • Remove rows or columns by label. Specify columns= to make column removal explicit.

    Call syntax Index.drop(labels[, errors])

  • Keep one occurrence of duplicate values or rows by default. Use keep to choose which occurrences survive.

    Call syntax Index.drop_duplicates(*[, keep])

  • Remove one or more levels of a hierarchical index.

    Call syntax Index.droplevel([level])

  • Drop entries with missing values. For DataFrames, subset restricts the columns considered when dropping rows.

    Call syntax Index.dropna([how])

  • pandas.Index.dtypeattribute
  • Mark repeated values or rows with a boolean mask. Use keep=False to mark every member of a duplicate set.

    Call syntax Index.duplicated([keep])

  • pandas.Index.emptyproperty
  • Check whether two objects have compatible shapes and the same contents, including missing values in the same locations.

    Call syntax Index.equals(other)

  • Encode distinct values as integers and return the codes alongside the corresponding unique values.

    Call syntax Index.factorize([sort, use_na_sentinel])

  • Replace missing values with supplied replacements, such as a scalar or values aligned by label.

    Call syntax Index.fillna(value)

  • Find where target labels would come from in this index. Unmatched labels produce -1.

    Call syntax Index.get_indexer(target[, method, limit, ...])

    Example
    pd.Index(["A", "B"]).get_indexer(["B", "C"])
  • Find positions for the requested labels even when this index contains duplicates.

    Call syntax Index.get_indexer_for(target)

  • Find all matching positions for target labels in a nonunique index and report the unmatched target positions.

    Call syntax Index.get_indexer_non_unique(target)

  • Extract the index labels belonging to a hierarchical level.

    Call syntax Index.get_level_values(level)

  • Look up the position or positions for a supplied index key.

    Call syntax Index.get_loc(key)

  • Find the integer start or end boundary of a label slice.

    Call syntax Index.get_slice_bound(label, side)

  • pandas.Index.has_duplicatesproperty

    Check whether any index label occurs more than once.

  • pandas.Index.hasnansattribute
  • Check that two indexes agree on values and index metadata such as type and names.

    Call syntax Index.identical(other)

  • Try a soft dtype conversion on object data without forcing strings to parse as numbers.

    Call syntax Index.infer_objects([copy])

  • pandas.Index.inferred_typeattribute
  • Add a value at a position. DataFrame inserts a column and rejects duplicate labels by default.

    Call syntax Index.insert(loc, item)

  • Get the labels shared with another index or collection.

    Call syntax Index.intersection(other[, sort])

    Example
    pd.Index(["A", "B"]).intersection(["B", "C"])
  • Check whether both indexes share the same identity marker, including views that preserve it.

    Call syntax Index.is_(other)

  • pandas.Index.is_monotonic_decreasingproperty
  • pandas.Index.is_monotonic_increasingproperty

    Check whether index values are in non-decreasing order.

  • pandas.Index.is_uniqueattribute

    Check whether each index label occurs once.

  • Test membership and return a boolean result for each value.

    Call syntax Index.isin(values[, level])

  • Identify missing values. The result is a boolean for a scalar and a boolean mask for an array-like input.

    Call syntax Index.isna()

  • Extract a scalar. For a Series, Index or array, the default extraction requires exactly one element.

    Call syntax Index.item()

  • Combine labels using a join rule and optionally return indexers for the original indexes.

    Call syntax Index.join(other, *[, how, level, ...])

  • Apply a substitution or callable to individual values. The receiver determines which mappers it supports.

    Call syntax Index.map(mapper[, na_action])

  • Find the largest value in the selection, group or window.

    Call syntax Index.max([axis, skipna])

  • Report bytes accounted for by pandas. For object data, deep=True includes more of the referenced values.

    Call syntax Index.memory_usage([deep])

  • Find the smallest value in the selection, group or window.

    Call syntax Index.min([axis, skipna])

  • pandas.Index.nameproperty
  • pandas.Index.namesproperty
  • pandas.Index.nbytesproperty
  • pandas.Index.ndimproperty
  • Identify present values by inverting the isna result.

    Call syntax Index.notna()

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax Index.nunique([dropna])

  • Build an index with replacements wherever the supplied boolean mask is true.

    Call syntax Index.putmask(mask, value)

  • Return a one-dimensional view of the Index itself.

    Call syntax Index.ravel([order])

  • Return the target index together with positions that map it to the current index.

    Call syntax Index.reindex(target[, method, level, ...])

  • Set the name of an Index or the names of a MultiIndex.

    Call syntax Index.rename(name, *[, inplace])

  • Repeat each value the given number of times. String repeat repeats the text within each element.

    Call syntax Index.repeat(repeats[, axis])

  • Substitute values using a mapping or match pattern. Enable regex matching where needed.

    Call syntax Index.replace([to_replace, value, regex])

  • Get the insertion positions that preserve the order of sorted data.

    Call syntax Index.searchsorted(value[, side, sorter])

  • Set one or more index level names, preserving their label values.

    Call syntax Index.set_names(names, *[, level, inplace])

  • pandas.Index.shapeproperty
  • Move time-based index labels by the requested number of frequency steps.

    Call syntax Index.shift([periods, freq])

  • pandas.Index.sizeproperty
  • Build a positional slice for the requested label interval.

    Call syntax Index.slice_indexer([start, end, step])

  • Get the integer boundaries for a range of labels.

    Call syntax Index.slice_locs([start, end, step])

  • Order items by one or more data values, controlling missing-value placement.

    Call syntax Index.sort_values(*[, return_indexer, ...])

  • Get labels occurring in exactly one of the two index collections.

    Call syntax Index.symmetric_difference(other[, ...])

  • pandas.Index.Tproperty
  • Select values by integer position in the order supplied.

    Call syntax Index.take(indices[, axis, allow_fill, ...])

  • Turn a one-dimensional pandas object into a DataFrame.

    Call syntax Index.to_frame([index, name])

  • Collect the values in a native Python list.

    Call syntax Index.to_list()

  • Convert values to a NumPy array. Mixed columns may require a common dtype.

    Call syntax Index.to_numpy([dtype, copy, na_value])

  • Build a Series from the index values, using the original labels by default.

    Call syntax Index.to_series([index, name])

  • Combine index labels from both collections into one index.

    Call syntax Index.union(other[, sort])

    Example
    pd.Index(["A", "B"]).union(["B", "C"])
  • Get distinct values in encounter order without sorting.

    Call syntax Index.unique([level])

  • Count occurrences of each value or row combination. Set normalize for proportions and dropna=False to keep missing values.

    Call syntax Index.value_counts([normalize, sort, ...])

  • pandas.Index.valuesproperty
  • Expose an alternate view or representation subject to the object's dtype and storage rules.

    Call syntax Index.view([cls])

  • Keep values where a condition is true and replace the rest with the supplied alternative.

    Call syntax Index.where(cond[, other])

  • pandas.IndexSlicedata

    Build an indexer for selecting across levels of a MultiIndex.

  • pandas.IntervalIndexclass
  • pandas.IntervalIndex.closedattribute
  • pandas.IntervalIndex.closed_leftproperty
  • pandas.IntervalIndex.closed_rightproperty
  • Check which intervals contain a given point, taking open and closed endpoints into account.

    Call syntax IntervalIndex.contains(other)

  • Build an object from parallel arrays. For a MultiIndex each array supplies a level. For interval data the arrays supply left and right edges.

    Call syntax IntervalIndex.from_arrays(left, right[, ...])

  • Construct adjacent intervals from a sequence of consecutive boundaries.

    Call syntax IntervalIndex.from_breaks(breaks[, closed, ...])

  • Construct an index or interval array from tuples. An interval tuple supplies its two endpoints.

    Call syntax IntervalIndex.from_tuples(data[, closed, ...])

  • Find where target labels would come from in this index. Unmatched labels produce -1.

    Call syntax IntervalIndex.get_indexer(target[, method, ...])

  • Look up the position or positions for a supplied index key.

    Call syntax IntervalIndex.get_loc(key)

  • pandas.IntervalIndex.is_emptyproperty
  • pandas.IntervalIndex.is_non_overlapping_monotonicattribute
  • pandas.IntervalIndex.is_overlappingproperty
  • pandas.IntervalIndex.leftattribute
  • pandas.IntervalIndex.lengthproperty
  • pandas.IntervalIndex.midattribute
  • pandas.IntervalIndex.open_leftproperty
  • pandas.IntervalIndex.open_rightproperty
  • Check whether intervals share any point, accounting for whether their endpoints are included.

    Call syntax IntervalIndex.overlaps(other)

  • pandas.IntervalIndex.rightattribute
  • Change which interval endpoints are included without moving their boundaries.

    Call syntax IntervalIndex.set_closed(closed)

  • Expose each interval as a pair containing its left and right edge.

    Call syntax IntervalIndex.to_tuples([na_tuple])

  • pandas.IntervalIndex.valuesproperty
  • Concatenate entries from one or more indexes after aligning the relevant names and levels where possible.

    Call syntax MultiIndex.append(other)

  • pandas.MultiIndex.codesproperty
  • Make a copy of the receiver. For an HDFStore, copy stored data to a different file.

    Call syntax MultiIndex.copy([names, deep, name])

  • Remove rows or columns by label. Specify columns= to make column removal explicit.

    Call syntax MultiIndex.drop(codes[, level, errors])

  • Remove one or more levels of a hierarchical index.

    Call syntax MultiIndex.droplevel([level])

  • pandas.MultiIndex.dtypesattribute
  • Build an object from parallel arrays. For a MultiIndex each array supplies a level. For interval data the arrays supply left and right edges.

    Call syntax MultiIndex.from_arrays(arrays[, sortorder, ...])

  • Build a MultiIndex with DataFrame columns providing index levels.

    Call syntax MultiIndex.from_frame(df[, sortorder, names])

  • Create a MultiIndex from all combinations of the supplied iterable levels.

    Call syntax MultiIndex.from_product(iterables[, ...])

  • Construct an index or interval array from tuples. An interval tuple supplies its two endpoints.

    Call syntax MultiIndex.from_tuples(tuples[, sortorder, ...])

  • Find where target labels would come from in this index. Unmatched labels produce -1.

    Call syntax MultiIndex.get_indexer(target[, method, ...])

  • Extract the index labels belonging to a hierarchical level.

    Call syntax MultiIndex.get_level_values(level)

  • Look up the position or positions for a supplied index key.

    Call syntax MultiIndex.get_loc(key)

  • Locate a key at a MultiIndex level and obtain the corresponding reduced index where possible.

    Call syntax MultiIndex.get_loc_level(key[, level, ...])

  • Get integer row locations matching a selection across MultiIndex levels.

    Call syntax MultiIndex.get_locs(seq)

  • pandas.MultiIndex.levelsattribute
  • pandas.MultiIndex.levshapeproperty
  • pandas.MultiIndex.namesproperty
  • pandas.MultiIndex.nlevelsproperty
  • Remove labels stored in MultiIndex levels that do not correspond to any entry.

    Call syntax MultiIndex.remove_unused_levels()

  • Rearrange levels of a hierarchical index.

    Call syntax MultiIndex.reorder_levels(order)

  • Change the integer codes that map entries to labels at each level.

    Call syntax MultiIndex.set_codes(codes, *[, level, ...])

  • Replace the collections of possible labels for specified MultiIndex levels.

    Call syntax MultiIndex.set_levels(levels, *[, level, ...])

  • Sort by the requested MultiIndex level and return the order used to rearrange entries.

    Call syntax MultiIndex.sortlevel([level, ascending, ...])

  • Exchange two levels of a hierarchical index.

    Call syntax MultiIndex.swaplevel([i, j])

  • Convert MultiIndex entries into an ordinary Index of tuples.

    Call syntax MultiIndex.to_flat_index()

  • Create a DataFrame with one column per MultiIndex level.

    Call syntax MultiIndex.to_frame([index, name, ...])

  • Keep labels within specified before and after bounds on a sorted axis.

    Call syntax MultiIndex.truncate([before, after])

  • pandas.PeriodIndexclass
  • Conform the object to a frequency. Use resample to aggregate observations into time bins.

    Call syntax PeriodIndex.asfreq([freq, how])

  • pandas.PeriodIndex.asi8property
  • pandas.PeriodIndex.dayproperty
  • pandas.PeriodIndex.day_of_weekproperty
  • pandas.PeriodIndex.day_of_yearproperty
  • pandas.PeriodIndex.dayofweekproperty
  • pandas.PeriodIndex.dayofyearproperty
  • pandas.PeriodIndex.days_in_monthproperty
  • pandas.PeriodIndex.daysinmonthproperty
  • pandas.PeriodIndex.end_timeproperty
  • pandas.PeriodIndex.freqproperty
  • pandas.PeriodIndex.freqstrproperty
  • Build a PeriodIndex from date fields such as years and quarters.

    Call syntax PeriodIndex.from_fields(*[, year, quarter, ...])

  • Build a PeriodIndex from integer period offsets at the selected frequency.

    Call syntax PeriodIndex.from_ordinals(ordinals, *, freq)

  • pandas.PeriodIndex.hourproperty
  • pandas.PeriodIndex.is_leap_yearproperty
  • pandas.PeriodIndex.minuteproperty
  • pandas.PeriodIndex.monthproperty
  • pandas.PeriodIndex.quarterproperty
  • pandas.PeriodIndex.qyearproperty
  • pandas.PeriodIndex.secondproperty
  • pandas.PeriodIndex.start_timeproperty
  • Format a time value using strftime directives such as %Y-%m-%d. Period.strftime is deprecated in pandas 3.1.1.

    Call syntax PeriodIndex.strftime(date_format)

  • Represent a period by a timestamp at its start or end.

    Call syntax PeriodIndex.to_timestamp([freq, how])

  • pandas.PeriodIndex.weekproperty
  • pandas.PeriodIndex.weekdayproperty
  • pandas.PeriodIndex.weekofyearproperty
  • pandas.PeriodIndex.yearproperty
  • pandas.RangeIndexclass
  • Build a compact RangeIndex from the start, stop and step of a Python range.

    Call syntax RangeIndex.from_range(data[, name, dtype])

  • pandas.RangeIndex.startproperty
  • pandas.RangeIndex.stepproperty
  • pandas.RangeIndex.stopproperty
  • pandas.TimedeltaIndexclass
  • Change the storage unit of time values, subject to precision and rounding rules.

    Call syntax TimedeltaIndex.as_unit(unit)

  • pandas.TimedeltaIndex.asi8property
  • Round timestamps or durations up to a frequency boundary.

    Call syntax TimedeltaIndex.ceil(freq[, ambiguous, ...])

  • pandas.TimedeltaIndex.componentsproperty
  • pandas.TimedeltaIndex.daysproperty
  • Round timestamps or durations down to a frequency boundary.

    Call syntax TimedeltaIndex.floor(freq[, ambiguous, ...])

  • pandas.TimedeltaIndex.inferred_freqattribute
  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax TimedeltaIndex.mean(*[, skipna, axis])

  • pandas.TimedeltaIndex.microsecondsproperty
  • pandas.TimedeltaIndex.nanosecondsproperty
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax TimedeltaIndex.round(freq[, ambiguous, ...])

  • pandas.TimedeltaIndex.secondsproperty
  • Turn a one-dimensional pandas object into a DataFrame.

    Call syntax TimedeltaIndex.to_frame([index, name])

  • Convert pandas durations to standard-library timedelta objects.

    Call syntax TimedeltaIndex.to_pytimedelta()

  • Build a Series from the index values, using the original labels by default.

    Call syntax TimedeltaIndex.to_series([index, name])

  • pandas.TimedeltaIndex.unitproperty
Arrays, scalars, and data types (245)
  • Inspect values and classify their apparent type, such as integer, string or mixed.

    Call syntax api.types.infer_dtype(value[, skipna])

  • Check for a real numeric dtype, excluding booleans and complex numbers.

    Call syntax api.types.is_any_real_numeric_dtype(arr_or_dtype)

  • Check whether a scalar is boolean.

    Call syntax api.types.is_bool(obj)

  • Check whether the input dtype represents booleans, including nullable booleans.

    Call syntax api.types.is_bool_dtype(arr_or_dtype)

  • Check whether the input uses a categorical dtype. This check is deprecated. Use isinstance(dtype, pd.CategoricalDtype).

    Call syntax api.types.is_categorical_dtype(arr_or_dtype)

  • Check whether a scalar is a complex number.

    Call syntax api.types.is_complex(obj)

  • Check whether the input uses a complex-number dtype.

    Call syntax api.types.is_complex_dtype(arr_or_dtype)

  • Check for either a timezone-naive or timezone-aware datetime64 dtype.

    Call syntax api.types.is_datetime64_any_dtype(arr_or_dtype)

  • Check whether the input uses a NumPy datetime64 dtype.

    Call syntax api.types.is_datetime64_dtype(arr_or_dtype)

  • Check whether a datetime dtype uses nanosecond resolution.

    Call syntax api.types.is_datetime64_ns_dtype(arr_or_dtype)

  • Check for a timezone-aware datetime dtype. Use isinstance(dtype, pd.DatetimeTZDtype) for new code.

    Call syntax api.types.is_datetime64tz_dtype(arr_or_dtype)

  • Check whether an object offers dictionary-like operations such as keyed access and keys.

    Call syntax api.types.is_dict_like(obj)

  • Compare two inputs using pandas dtype equivalence.

    Call syntax api.types.is_dtype_equal(source, target)

  • Check whether an input uses a pandas ExtensionDtype.

    Call syntax api.types.is_extension_array_dtype(arr_or_dtype)

  • Check whether an object behaves like an iterable file with read or write support.

    Call syntax api.types.is_file_like(obj)

  • Check whether a scalar is floating-point.

    Call syntax api.types.is_float(obj)

  • Check whether a dtype stores floating-point numbers.

    Call syntax api.types.is_float_dtype(arr_or_dtype)

  • Check whether Python can compute a hash for this value.

    Call syntax api.types.is_hashable(obj[, allow_slice])

  • Check for a signed 64-bit integer dtype. This helper is deprecated.

    Call syntax api.types.is_int64_dtype(arr_or_dtype)

  • Check whether an individual value is an integer.

    Call syntax api.types.is_integer(obj)

  • Check whether a dtype stores integers, including nullable integer types.

    Call syntax api.types.is_integer_dtype(arr_or_dtype)

  • Check whether an input has interval dtype. Use isinstance(dtype, pd.IntervalDtype) for new code.

    Call syntax api.types.is_interval_dtype(arr_or_dtype)

  • Check for an object that supports getting its next value.

    Call syntax api.types.is_iterator(obj)

  • Check whether an object behaves like a sequence, set or array for pandas purposes.

    Call syntax api.types.is_list_like(obj[, allow_sets])

  • Check whether the value is a tuple whose fields have names.

    Call syntax api.types.is_named_tuple(obj)

  • Check whether a scalar is a numeric object.

    Call syntax api.types.is_number(obj)

  • Check whether a dtype is numeric according to pandas.

    Call syntax api.types.is_numeric_dtype(arr_or_dtype)

  • Check whether the input uses the generic NumPy object dtype.

    Call syntax api.types.is_object_dtype(arr_or_dtype)

  • Check for a period dtype. Use isinstance(dtype, pd.PeriodDtype) for new code.

    Call syntax api.types.is_period_dtype(arr_or_dtype)

  • Check whether the input is an already compiled regular expression.

    Call syntax api.types.is_re(obj)

  • Check whether the input can be compiled as a regular expression.

    Call syntax api.types.is_re_compilable(obj)

  • Check for an integer dtype that can represent negative values.

    Call syntax api.types.is_signed_integer_dtype(arr_or_dtype)

  • Check whether the input has sparse dtype. Use isinstance(dtype, pd.SparseDtype) for new code.

    Call syntax api.types.is_sparse(arr)

  • Check whether the input dtype or applicable array values are string-like.

    Call syntax api.types.is_string_dtype(arr_or_dtype)

  • Check for a NumPy timedelta dtype.

    Call syntax api.types.is_timedelta64_dtype(arr_or_dtype)

  • Check for a NumPy timedelta dtype with nanosecond units.

    Call syntax api.types.is_timedelta64_ns_dtype(arr_or_dtype)

  • Check for an integer dtype limited to nonnegative values.

    Call syntax api.types.is_unsigned_integer_dtype(arr_or_dtype)

  • Normalize a dtype specification to a pandas or NumPy dtype object.

    Call syntax api.types.pandas_dtype(dtype)

  • Combine categorical values, forming a category set that can represent the combined result.

    Call syntax api.types.union_categoricals(to_union[, ...])

  • pandas.arrayfunction

    Build a one-dimensional pandas array and optionally specify its dtype.

    Call syntax pd.array(data[, dtype, copy])

  • pandas.arrays.ArrowExtensionArrayclass
  • pandas.arrays.ArrowStringArrayclass
  • pandas.arrays.BooleanArrayclass
  • pandas.arrays.DatetimeArrayclass
  • pandas.arrays.FloatingArrayclass
  • pandas.arrays.IntegerArrayclass
  • pandas.arrays.IntervalArrayclass
  • pandas.arrays.IntervalArray.closedproperty
  • Check which intervals contain a given point, taking open and closed endpoints into account.

    Call syntax IntervalArray.contains(other)

  • Build an object from parallel arrays. For a MultiIndex each array supplies a level. For interval data the arrays supply left and right edges.

    Call syntax IntervalArray.from_arrays(left, right, closed='right', copy=False, dtype=None)

  • Construct adjacent intervals from a sequence of consecutive boundaries.

    Call syntax IntervalArray.from_breaks(breaks, closed='right', copy=False, dtype=None)

  • Construct an index or interval array from tuples. An interval tuple supplies its two endpoints.

    Call syntax IntervalArray.from_tuples(data, closed='right', copy=False, dtype=None)

  • pandas.arrays.IntervalArray.is_emptyattribute
  • pandas.arrays.IntervalArray.is_non_overlapping_monotonicproperty
  • pandas.arrays.IntervalArray.leftproperty
  • pandas.arrays.IntervalArray.lengthproperty
  • pandas.arrays.IntervalArray.midproperty
  • Check whether intervals share any point, accounting for whether their endpoints are included.

    Call syntax IntervalArray.overlaps(other)

  • pandas.arrays.IntervalArray.rightproperty
  • Change which interval endpoints are included without moving their boundaries.

    Call syntax IntervalArray.set_closed(closed)

  • Expose each interval as a pair containing its left and right edge.

    Call syntax IntervalArray.to_tuples(na_tuple=True)

  • pandas.arrays.PeriodArrayclass
  • pandas.arrays.SparseArrayclass
  • pandas.arrays.StringArrayclass
  • pandas.arrays.TimedeltaArrayclass
  • pandas.ArrowDtypeclass
  • pandas.BooleanDtypeclass
  • Expose values through NumPy's array protocol.

    Call syntax Categorical.__array__([dtype, copy])

  • Extend the list of permitted categories without changing observations.

    Call syntax Categorical.add_categories(new_categories)

  • Mark categories as ordered so comparisons can use their declared order.

    Call syntax Categorical.as_ordered()

  • Mark categories as unordered, preserving their labels.

    Call syntax Categorical.as_unordered()

  • pandas.Categorical.categoriesproperty
  • pandas.Categorical.codesproperty
  • pandas.Categorical.dtypeproperty
  • Build a categorical object using integer codes and existing categories.

    Call syntax Categorical.from_codes(codes[, categories, ...])

  • Apply a substitution or callable to individual values. The receiver determines which mappers it supports.

    Call syntax Categorical.map(mapper[, na_action])

  • pandas.Categorical.orderedproperty
  • Remove selected categories and mark observations using them as missing.

    Call syntax Categorical.remove_categories(removals)

  • Remove declared categories that do not occur in the data.

    Call syntax Categorical.remove_unused_categories()

  • Change the labels of categories and preserve the underlying assignments.

    Call syntax Categorical.rename_categories(new_categories)

  • Set the order of existing categories without changing which category each value belongs to.

    Call syntax Categorical.reorder_categories(new_categories)

  • Replace the permitted categories. Observations outside the new set can become missing.

    Call syntax Categorical.set_categories(new_categories[, ...])

  • pandas.CategoricalDtypeclass
  • pandas.CategoricalDtype.categoriesproperty
  • pandas.CategoricalDtype.orderedproperty
  • pandas.DatetimeTZDtypeclass
  • pandas.DatetimeTZDtype.tzproperty
  • pandas.DatetimeTZDtype.unitproperty
  • pandas.Float32Dtypeclass
  • pandas.Float64Dtypeclass
  • pandas.Int16Dtypeclass
  • pandas.Int32Dtypeclass
  • pandas.Int64Dtypeclass
  • pandas.Int8Dtypeclass
  • pandas.Intervalclass
  • pandas.Interval.closedattribute
  • pandas.Interval.closed_leftattribute
  • pandas.Interval.closed_rightattribute
  • pandas.Interval.is_emptyattribute
  • pandas.Interval.leftattribute
  • pandas.Interval.lengthattribute
  • pandas.Interval.midattribute
  • pandas.Interval.open_leftattribute
  • pandas.Interval.open_rightattribute
  • Check whether intervals share any point, accounting for whether their endpoints are included.

    Call syntax Interval.overlaps(other)

  • pandas.Interval.rightattribute
  • pandas.IntervalDtypeclass
  • pandas.IntervalDtype.subtypeproperty
  • pandas.Periodclass
  • Conform the object to a frequency. Use resample to aggregate observations into time bins.

    Call syntax Period.asfreq(freq[, how])

  • pandas.Period.dayattribute
  • pandas.Period.day_of_weekattribute
  • pandas.Period.day_of_yearattribute
  • pandas.Period.dayofweekattribute
  • pandas.Period.dayofyearattribute
  • pandas.Period.days_in_monthattribute
  • pandas.Period.daysinmonthattribute
  • pandas.Period.end_timeattribute
  • pandas.Period.freqattribute
  • pandas.Period.freqstrattribute
  • pandas.Period.hourattribute
  • pandas.Period.is_leap_yearattribute
  • pandas.Period.minuteattribute
  • pandas.Period.monthattribute
  • Get the current time in the requested timezone, or the current period at the supplied frequency for Period.

    Call syntax Period.now(freq)

  • pandas.Period.ordinalattribute
  • pandas.Period.quarterattribute
  • pandas.Period.qyearattribute
  • pandas.Period.secondattribute
  • pandas.Period.start_timeattribute
  • Format this period with formatting directives. This method is deprecated in pandas 3.1.1. Convert to a timestamp first when its start or end is the intended value.

    Call syntax Period.strftime(fmt)

  • Represent a period by a timestamp at its start or end.

    Call syntax Period.to_timestamp([freq, how])

  • pandas.Period.weekattribute
  • pandas.Period.weekdayattribute
  • pandas.Period.weekofyearattribute
  • pandas.Period.yearattribute
  • pandas.PeriodDtypeclass
  • pandas.PeriodDtype.freqproperty
  • pandas.SparseDtypeclass
  • pandas.StringDtypeclass
  • pandas.StringDtype.na_valueproperty
  • pandas.StringDtype.storageproperty
  • pandas.Timedeltaclass
  • Change the storage unit of time values, subject to precision and rounding rules.

    Call syntax Timedelta.as_unit(unit[, round_ok])

  • pandas.Timedelta.asm8attribute
  • Round timestamps or durations up to a frequency boundary.

    Call syntax Timedelta.ceil(freq)

  • pandas.Timedelta.componentsattribute
  • pandas.Timedelta.daysattribute
  • Round timestamps or durations down to a frequency boundary.

    Call syntax Timedelta.floor(freq)

  • Express a timestamp or duration as text using its ISO 8601 format.

    Call syntax Timedelta.isoformat()

  • pandas.Timedelta.maxattribute
  • pandas.Timedelta.microsecondsattribute
  • pandas.Timedelta.minattribute
  • pandas.Timedelta.nanosecondsattribute
  • pandas.Timedelta.resolutionattribute
  • pandas.Timedelta.resolution_stringattribute
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax Timedelta.round(freq)

  • pandas.Timedelta.secondsattribute
  • Convert the duration to a NumPy timedelta64 scalar.

    Call syntax Timedelta.to_numpy([dtype, copy])

  • Convert pandas durations to standard-library timedelta objects.

    Call syntax Timedelta.to_pytimedelta()

  • Convert a pandas duration to a NumPy timedelta64 scalar.

    Call syntax Timedelta.to_timedelta64()

  • Express a duration as seconds, including its fractional portion.

    Call syntax Timedelta.total_seconds()

  • pandas.Timedelta.unitattribute
  • pandas.Timedelta.valueattribute
  • Expose an alternate view or representation subject to the object's dtype and storage rules.

    Call syntax Timedelta.view(dtype)

  • pandas.Timestampclass
  • Change the storage unit of time values, subject to precision and rounding rules.

    Call syntax Timestamp.as_unit(unit[, round_ok])

  • pandas.Timestamp.asm8attribute
  • Represent the same timestamp in another timezone.

    Call syntax Timestamp.astimezone(tz)

  • Round timestamps or durations up to a frequency boundary.

    Call syntax Timestamp.ceil(freq[, ambiguous, nonexistent])

  • Construct a single timestamp from a calendar date and clock time.

    Call syntax Timestamp.combine(date, time)

  • Format the timestamp as a human-readable ctime-style string.

    Call syntax Timestamp.ctime()

  • Extract the calendar date as a standard-library date object.

    Call syntax Timestamp.date()

  • pandas.Timestamp.dayattribute
  • Get weekday names, optionally using a specified locale.

    Call syntax Timestamp.day_name([locale])

  • pandas.Timestamp.day_of_weekattribute
  • pandas.Timestamp.day_of_yearattribute
  • pandas.Timestamp.dayofweekattribute
  • pandas.Timestamp.dayofyearattribute
  • pandas.Timestamp.days_in_monthattribute
  • pandas.Timestamp.daysinmonthproperty
  • Get the daylight-saving adjustment associated with the timestamp, when a timezone is available.

    Call syntax Timestamp.dst()

  • Round timestamps or durations down to a frequency boundary.

    Call syntax Timestamp.floor(freq[, ambiguous, nonexistent])

  • pandas.Timestamp.foldattribute
  • Construct a timestamp from an ISO year, week number and weekday.

    Call syntax Timestamp.fromisocalendar(year, week, day)

  • Create a timestamp from a supported ISO date or datetime string.

    Call syntax Timestamp.fromisoformat(date_string)

  • Create a timestamp from a proleptic Gregorian day number, where ordinal 1 is January 1 of year 1.

    Call syntax Timestamp.fromordinal(ordinal[, tz])

  • Create a timestamp from POSIX seconds, interpreted in the supplied timezone or local time.

    Call syntax Timestamp.fromtimestamp(ts[, tz])

  • pandas.Timestamp.hourattribute
  • pandas.Timestamp.is_leap_yearattribute
  • pandas.Timestamp.is_month_endattribute
  • pandas.Timestamp.is_month_startattribute
  • pandas.Timestamp.is_quarter_endattribute
  • pandas.Timestamp.is_quarter_startattribute
  • pandas.Timestamp.is_year_endattribute
  • pandas.Timestamp.is_year_startattribute
  • Get the ISO week-based year, week number and day of the week.

    Call syntax Timestamp.isocalendar()

  • Express a timestamp or duration as text using its ISO 8601 format.

    Call syntax Timestamp.isoformat([sep, timespec])

  • Map the weekday to an integer where Monday is 1 and Sunday is 7.

    Call syntax Timestamp.isoweekday()

  • pandas.Timestamp.maxattribute
  • pandas.Timestamp.microsecondattribute
  • pandas.Timestamp.minattribute
  • pandas.Timestamp.minuteattribute
  • pandas.Timestamp.monthattribute
  • Get month names, optionally using a specified locale.

    Call syntax Timestamp.month_name([locale])

  • pandas.Timestamp.nanosecondattribute
  • Set the clock time to midnight while preserving the calendar date and timezone.

    Call syntax Timestamp.normalize()

  • Get the current time in the requested timezone, or the current period at the supplied frequency for Period.

    Call syntax Timestamp.now([tz])

  • pandas.Timestamp.quarterattribute
  • Return a timestamp with selected fields such as year or hour updated.

    Call syntax Timestamp.replace([year, month, day, hour, ...])

  • pandas.Timestamp.resolutionattribute
  • Round values to a specified precision. For datetime-like objects use a frequency.

    Call syntax Timestamp.round(freq[, ambiguous, nonexistent])

  • pandas.Timestamp.secondattribute
  • Format a time value using strftime directives such as %Y-%m-%d. Period.strftime is deprecated in pandas 3.1.1.

    Call syntax Timestamp.strftime(format)

  • A placeholder for parsing timestamp strings with a format. Use pd.to_datetime(value, format=...) because Timestamp.strptime raises NotImplementedError.

    Call syntax Timestamp.strptime(date_string, format)

  • Get a Python time object containing the clock time, with no timezone attached.

    Call syntax Timestamp.time()

  • Express the timestamp as seconds since the POSIX epoch.

    Call syntax Timestamp.timestamp()

  • Get the calendar fields in a standard-library struct_time representation.

    Call syntax Timestamp.timetuple()

  • Extract a Python time object including the timestamp's timezone information.

    Call syntax Timestamp.timetz()

  • Convert the timestamp to a NumPy datetime64 scalar.

    Call syntax Timestamp.to_datetime64()

  • Express each date or timestamp as a Julian day number.

    Call syntax Timestamp.to_julian_date()

  • Convert the timestamp to a NumPy datetime64 scalar.

    Call syntax Timestamp.to_numpy([dtype, copy])

  • Identify the period containing the timestamp at the requested frequency.

    Call syntax Timestamp.to_period([freq])

  • Convert timestamps to standard-library datetime objects.

    Call syntax Timestamp.to_pydatetime([warn])

  • Get a timestamp for the current local date and time.

    Call syntax Timestamp.today([tz])

  • Get the Gregorian day number where January 1 of year 1 is 1.

    Call syntax Timestamp.toordinal()

  • pandas.Timestamp.tzproperty
  • Express timezone-aware data in another zone while keeping the same instants.

    Call syntax Timestamp.tz_convert(tz)

  • Assign a timezone to naive datetimes or remove it while keeping local clock values.

    Call syntax Timestamp.tz_localize(tz[, ambiguous, ...])

  • pandas.Timestamp.tzinfoproperty
  • Get the name or abbreviation of the timestamp's timezone, if it has one.

    Call syntax Timestamp.tzname()

  • pandas.Timestamp.unitattribute
  • Construct a UTC timestamp from seconds since the POSIX epoch.

    Call syntax Timestamp.utcfromtimestamp(ts)

  • Get the current UTC timestamp. In pandas 3.1.1 use Timestamp.now(tz="UTC") for new code.

    Call syntax Timestamp.utcnow()

  • Get the difference between local clock time and UTC as a duration.

    Call syntax Timestamp.utcoffset()

  • Convert the timestamp to UTC calendar fields in struct_time form.

    Call syntax Timestamp.utctimetuple()

  • pandas.Timestamp.valueattribute
  • pandas.Timestamp.weekattribute
  • Get the day of the week as a number from Monday=0 to Sunday=6.

    Call syntax Timestamp.weekday()

  • pandas.Timestamp.weekofyearattribute
  • pandas.Timestamp.yearattribute
  • pandas.UInt16Dtypeclass
  • pandas.UInt32Dtypeclass
  • pandas.UInt64Dtypeclass
  • pandas.UInt8Dtypeclass
Date offsets and frequencies (186)
  • pandas._libs.tslibs.offsets.BaseOffsetclass
  • pandas._libs.tslibs.offsets.BHalfYearBeginclass
  • pandas._libs.tslibs.offsets.BHalfYearEndclass
  • pandas._libs.tslibs.offsets.BQuarterBeginclass
  • pandas._libs.tslibs.offsets.BQuarterEndclass
  • pandas._libs.tslibs.offsets.BusinessDayclass
  • pandas._libs.tslibs.offsets.BusinessHourclass
  • pandas._libs.tslibs.offsets.BusinessMonthBeginclass
  • pandas._libs.tslibs.offsets.BusinessMonthEndclass
  • pandas._libs.tslibs.offsets.BYearBeginclass
  • pandas._libs.tslibs.offsets.BYearEndclass
  • pandas._libs.tslibs.offsets.CustomBusinessDayclass
  • pandas._libs.tslibs.offsets.CustomBusinessHourclass
  • pandas._libs.tslibs.offsets.CustomBusinessMonthBeginclass
  • pandas._libs.tslibs.offsets.CustomBusinessMonthEndclass
  • pandas._libs.tslibs.offsets.Dayclass
  • pandas._libs.tslibs.offsets.Easterclass
  • pandas._libs.tslibs.offsets.FY5253class
  • pandas._libs.tslibs.offsets.FY5253Quarterclass
  • pandas._libs.tslibs.offsets.HalfYearBeginclass
  • pandas._libs.tslibs.offsets.HalfYearEndclass
  • pandas._libs.tslibs.offsets.Hourclass
  • pandas._libs.tslibs.offsets.LastWeekOfMonthclass
  • pandas._libs.tslibs.offsets.Microclass
  • pandas._libs.tslibs.offsets.Milliclass
  • pandas._libs.tslibs.offsets.Minuteclass
  • pandas._libs.tslibs.offsets.MonthBeginclass
  • pandas._libs.tslibs.offsets.MonthEndclass
  • pandas._libs.tslibs.offsets.Nanoclass
  • pandas._libs.tslibs.offsets.QuarterBeginclass
  • pandas._libs.tslibs.offsets.QuarterEndclass
  • pandas._libs.tslibs.offsets.Secondclass
  • pandas._libs.tslibs.offsets.SemiMonthBeginclass
  • pandas._libs.tslibs.offsets.SemiMonthEndclass
  • pandas._libs.tslibs.offsets.Tickclass
  • pandas._libs.tslibs.offsets.Weekclass
  • pandas._libs.tslibs.offsets.WeekOfMonthclass
  • pandas._libs.tslibs.offsets.YearBeginclass
  • pandas._libs.tslibs.offsets.YearEndclass
  • pandas.DateOffsetclass
  • Convert a frequency specification into a pandas DateOffset object.

    Call syntax to_offset(freq[, is_period])

  • pandas.tseries.holiday.AbstractHolidayCalendarclass
  • List holiday occurrences within a date range using the calendar's configured rules.

    Call syntax AbstractHolidayCalendar.holidays([start, ...])

  • Combine this calendar's holiday rules with the rules from another calendar.

    Call syntax AbstractHolidayCalendar.merge(other[, inplace])

  • Combine holiday rules from two calendars into a single rule list.

    Call syntax AbstractHolidayCalendar.merge_class(base, other)

  • Look up a calendar's holiday rule by its configured name.

    Call syntax AbstractHolidayCalendar.rule_from_name(name)

  • Apply the nearest-weekday rule and then move ahead one business day.

    Call syntax after_nearest_workday(dt)

  • Apply the nearest-weekday rule and then move back one business day.

    Call syntax before_nearest_workday(dt)

  • Get an instance of a registered calendar by name.

    Call syntax get_calendar(name)

  • pandas.tseries.holiday.Holidayclass
  • Calculate the observed dates for a holiday rule over a requested range.

    Call syntax Holiday.dates(start_date, end_date[, ...])

  • Create a holiday calendar class by combining sets of rules.

    Call syntax HolidayCalendarFactory(name, base, other[, ...])

  • Observe a Saturday holiday on Friday and a Sunday holiday on Monday.

    Call syntax nearest_workday(dt)

  • Observe Saturday or Sunday on the following Monday.

    Call syntax next_monday(dt)

  • Observe Saturday on Monday and Sunday or Monday on Tuesday.

    Call syntax next_monday_or_tuesday(dt)

  • Advance to the next weekday, skipping Saturday and Sunday.

    Call syntax next_workday(dt)

  • Move Saturday and Sunday back to Friday.

    Call syntax previous_friday(dt)

  • Move back to the previous weekday, skipping Saturday and Sunday.

    Call syntax previous_workday(dt)

  • Register a holiday calendar class so callers can look it up by name.

    Call syntax register(cls)

  • Move a Sunday observance to Monday while leaving other weekdays as supplied.

    Call syntax sunday_to_monday(dt)

  • pandas.tseries.holiday.USFederalHolidayCalendarclass
  • Move a Saturday or Sunday observance to Monday.

    Call syntax weekend_to_monday(dt)

  • pandas.tseries.offsets.BaseOffsetclass
  • Create an independent offset with the same frequency and settings.

    Call syntax BaseOffset.copy()

  • pandas.tseries.offsets.BaseOffset.freqstrattribute
  • Check whether a timestamp falls on the month-end boundary according to this offset.

    Call syntax BaseOffset.is_month_end(ts)

  • Check whether a timestamp falls on the month-start boundary according to this offset.

    Call syntax BaseOffset.is_month_start(ts)

  • Check whether a timestamp already falls on the offset's schedule.

    Call syntax BaseOffset.is_on_offset(dt)

  • Check whether a timestamp falls on the quarter-end boundary according to this offset.

    Call syntax BaseOffset.is_quarter_end(ts)

  • Check whether a timestamp falls on the quarter-start boundary according to this offset.

    Call syntax BaseOffset.is_quarter_start(ts)

  • Check whether a timestamp falls on the year-end boundary according to this offset.

    Call syntax BaseOffset.is_year_end(ts)

  • Check whether a timestamp falls on the year-start boundary according to this offset.

    Call syntax BaseOffset.is_year_start(ts)

  • pandas.tseries.offsets.BaseOffset.kwdsattribute
  • pandas.tseries.offsets.BaseOffset.nattribute
  • pandas.tseries.offsets.BaseOffset.nameattribute
  • pandas.tseries.offsets.BaseOffset.nanosattribute
  • pandas.tseries.offsets.BaseOffset.normalizeattribute
  • Keep an on-schedule date or move it backward to the nearest offset date.

    Call syntax BaseOffset.rollback(dt)

  • Keep an on-schedule date or move it forward to the nearest offset date.

    Call syntax BaseOffset.rollforward(dt)

  • pandas.tseries.offsets.BaseOffset.rule_codeattribute
  • pandas.tseries.offsets.BDayattribute
  • pandas.tseries.offsets.BHalfYearBeginclass
  • pandas.tseries.offsets.BHalfYearBegin.startingMonthattribute
  • pandas.tseries.offsets.BHalfYearEndclass
  • pandas.tseries.offsets.BHalfYearEnd.startingMonthattribute
  • pandas.tseries.offsets.BMonthBeginattribute
  • pandas.tseries.offsets.BMonthEndattribute
  • pandas.tseries.offsets.BQuarterBeginclass
  • pandas.tseries.offsets.BQuarterBegin.startingMonthattribute
  • pandas.tseries.offsets.BQuarterEndclass
  • pandas.tseries.offsets.BQuarterEnd.startingMonthattribute
  • pandas.tseries.offsets.BusinessDayclass
  • pandas.tseries.offsets.BusinessDay.calendarattribute
  • pandas.tseries.offsets.BusinessDay.holidaysattribute
  • pandas.tseries.offsets.BusinessDay.offsetattribute
  • pandas.tseries.offsets.BusinessDay.weekmaskattribute
  • pandas.tseries.offsets.BusinessHourclass
  • pandas.tseries.offsets.BusinessHour.calendarattribute
  • pandas.tseries.offsets.BusinessHour.endattribute
  • pandas.tseries.offsets.BusinessHour.holidaysattribute
  • pandas.tseries.offsets.BusinessHour.offsetattribute
  • pandas.tseries.offsets.BusinessHour.startattribute
  • pandas.tseries.offsets.BusinessHour.weekmaskattribute
  • pandas.tseries.offsets.BusinessMonthBeginclass
  • pandas.tseries.offsets.BusinessMonthEndclass
  • pandas.tseries.offsets.BYearBeginclass
  • pandas.tseries.offsets.BYearBegin.monthattribute
  • pandas.tseries.offsets.BYearEndclass
  • pandas.tseries.offsets.BYearEnd.monthattribute
  • pandas.tseries.offsets.CBMonthBeginattribute
  • pandas.tseries.offsets.CBMonthEndattribute
  • pandas.tseries.offsets.CDayattribute
  • pandas.tseries.offsets.CustomBusinessDayclass
  • pandas.tseries.offsets.CustomBusinessDay.calendarattribute
  • pandas.tseries.offsets.CustomBusinessDay.holidaysattribute
  • pandas.tseries.offsets.CustomBusinessDay.offsetattribute
  • pandas.tseries.offsets.CustomBusinessDay.weekmaskattribute
  • pandas.tseries.offsets.CustomBusinessHourclass
  • pandas.tseries.offsets.CustomBusinessHour.calendarattribute
  • pandas.tseries.offsets.CustomBusinessHour.endattribute
  • pandas.tseries.offsets.CustomBusinessHour.holidaysattribute
  • pandas.tseries.offsets.CustomBusinessHour.offsetattribute
  • pandas.tseries.offsets.CustomBusinessHour.startattribute
  • pandas.tseries.offsets.CustomBusinessHour.weekmaskattribute
  • pandas.tseries.offsets.CustomBusinessMonthBeginclass
  • pandas.tseries.offsets.CustomBusinessMonthBegin.calendarattribute
  • pandas.tseries.offsets.CustomBusinessMonthBegin.holidaysattribute
  • pandas.tseries.offsets.CustomBusinessMonthBegin.m_offsetattribute
  • pandas.tseries.offsets.CustomBusinessMonthBegin.offsetattribute
  • pandas.tseries.offsets.CustomBusinessMonthBegin.weekmaskattribute
  • pandas.tseries.offsets.CustomBusinessMonthEndclass
  • pandas.tseries.offsets.CustomBusinessMonthEnd.calendarattribute
  • pandas.tseries.offsets.CustomBusinessMonthEnd.holidaysattribute
  • pandas.tseries.offsets.CustomBusinessMonthEnd.m_offsetattribute
  • pandas.tseries.offsets.CustomBusinessMonthEnd.offsetattribute
  • pandas.tseries.offsets.CustomBusinessMonthEnd.weekmaskattribute
  • pandas.tseries.offsets.DateOffsetclass
  • pandas.tseries.offsets.Dayclass
  • pandas.tseries.offsets.Easterclass
  • pandas.tseries.offsets.FY5253class
  • Get the suffix that encodes the parameters of a 52–53-week fiscal offset.

    Call syntax FY5253.get_rule_code_suffix()

  • Compute a fiscal year-end date using the configured month, weekday and boundary rule.

    Call syntax FY5253.get_year_end(dt)

  • pandas.tseries.offsets.FY5253.startingMonthattribute
  • pandas.tseries.offsets.FY5253.variationattribute
  • pandas.tseries.offsets.FY5253.weekdayattribute
  • pandas.tseries.offsets.FY5253Quarterclass
  • Get the suffix that encodes the parameters of a 52–53-week fiscal offset.

    Call syntax FY5253Quarter.get_rule_code_suffix()

  • Compute the length in weeks of each quarter in the fiscal year containing the date.

    Call syntax FY5253Quarter.get_weeks(dt)

  • pandas.tseries.offsets.FY5253Quarter.qtr_with_extra_weekattribute
  • pandas.tseries.offsets.FY5253Quarter.startingMonthattribute
  • pandas.tseries.offsets.FY5253Quarter.variationattribute
  • pandas.tseries.offsets.FY5253Quarter.weekdayattribute
  • Check whether the date's fiscal year contains 53 weeks.

    Call syntax FY5253Quarter.year_has_extra_week(dt)

  • pandas.tseries.offsets.HalfYearBeginclass
  • pandas.tseries.offsets.HalfYearBegin.startingMonthattribute
  • pandas.tseries.offsets.HalfYearEndclass
  • pandas.tseries.offsets.HalfYearEnd.startingMonthattribute
  • pandas.tseries.offsets.Hourclass
  • pandas.tseries.offsets.LastWeekOfMonthclass
  • pandas.tseries.offsets.LastWeekOfMonth.weekattribute
  • pandas.tseries.offsets.LastWeekOfMonth.weekdayattribute
  • pandas.tseries.offsets.Microclass
  • pandas.tseries.offsets.Milliclass
  • pandas.tseries.offsets.Minuteclass
  • pandas.tseries.offsets.MonthBeginclass
  • pandas.tseries.offsets.MonthEndclass
  • pandas.tseries.offsets.Nanoclass
  • pandas.tseries.offsets.QuarterBeginclass
  • pandas.tseries.offsets.QuarterBegin.startingMonthattribute
  • pandas.tseries.offsets.QuarterEndclass
  • pandas.tseries.offsets.QuarterEnd.startingMonthattribute
  • pandas.tseries.offsets.Secondclass
  • pandas.tseries.offsets.SemiMonthBeginclass
  • pandas.tseries.offsets.SemiMonthBegin.day_of_monthattribute
  • pandas.tseries.offsets.SemiMonthEndclass
  • pandas.tseries.offsets.SemiMonthEnd.day_of_monthattribute
  • pandas.tseries.offsets.Tickclass
  • pandas.tseries.offsets.Weekclass
  • pandas.tseries.offsets.Week.weekdayattribute
  • pandas.tseries.offsets.WeekOfMonthclass
  • pandas.tseries.offsets.WeekOfMonth.weekattribute
  • pandas.tseries.offsets.WeekOfMonth.weekdayattribute
  • pandas.tseries.offsets.YearBeginclass
  • pandas.tseries.offsets.YearBegin.monthattribute
  • pandas.tseries.offsets.YearEndclass
  • pandas.tseries.offsets.YearEnd.monthattribute
Resampling (29)
  • Support iteration, yielding columns for a DataFrame or key–object pairs for GroupBy.

    Call syntax Resampler.__iter__()

  • Summarize values with one or more operations using the same interface as agg.

    Call syntax Resampler.aggregate([func])

  • Run a callable over the units of the object, such as rows, columns, groups, or windows. The receiver controls which units it passes to the callable.

    Call syntax Resampler.apply([func])

  • Conform the time index to the target frequency, inserting gaps at newly introduced timestamps.

    Call syntax Resampler.asfreq([fill_value])

  • Fill gaps introduced by upsampling with later observations.

    Call syntax Resampler.bfill([limit])

  • Count nonmissing values along the selected axis or within each group or window.

    Call syntax Resampler.count()

  • Fill gaps introduced by upsampling with earlier observations.

    Call syntax Resampler.ffill([limit])

  • Take the first value in each group or time bin, skipping missing values by default where supported.

    Call syntax Resampler.first([numeric_only, min_count, ...])

  • Retrieve the original observations belonging to the specified group key.

    Call syntax Resampler.get_group(name)

  • pandas.api.typing.Resampler.groupsproperty
  • pandas.api.typing.Resampler.indicesproperty
  • Estimate missing values from neighboring observations using a selected interpolation method.

    Call syntax Resampler.interpolate([method, axis, limit, ...])

  • Take the last value in each group or time bin, skipping missing values by default where supported.

    Call syntax Resampler.last([numeric_only, min_count, skipna])

  • Find the largest value in the selection, group or window.

    Call syntax Resampler.max([numeric_only, min_count])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax Resampler.mean([numeric_only])

  • Find the middle of the sorted values, averaging the central pair when there are two.

    Call syntax Resampler.median([numeric_only])

  • Find the smallest value in the selection, group or window.

    Call syntax Resampler.min([numeric_only, min_count])

  • Fill new resampling positions from their nearest observations, optionally limiting consecutive fills.

    Call syntax Resampler.nearest([limit])

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax Resampler.nunique()

  • Compute open, high, low and close values within each group or time bin.

    Call syntax Resampler.ohlc()

  • Pass the current object to a callable while staying in a method chain.

    Call syntax Resampler.pipe(func, *args, **kwargs)

  • Multiply values together along the selected axis, group or window.

    Call syntax Resampler.prod([numeric_only, min_count])

  • Estimate the value at a specified fraction of the sorted distribution.

    Call syntax Resampler.quantile([q])

  • Calculate the standard error of the mean for the selected data.

    Call syntax Resampler.sem([ddof, numeric_only])

  • Count rows in each group or bin, including rows whose values are missing.

    Call syntax Resampler.size()

  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax Resampler.std([ddof, numeric_only])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax Resampler.sum([numeric_only, min_count])

    Example
    orders.set_index("day")["units"].resample("2D").sum(min_count=1)
  • Apply an operation and retain compatibility with the input shape. GroupBy aligns the result with the original rows.

    Call syntax Resampler.transform(arg, *args, **kwargs)

  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax Resampler.var([ddof, numeric_only])

Window operations (54)
  • pandas.api.indexers.BaseIndexerclass
  • pandas.api.indexers.FixedForwardWindowIndexerclass
  • Summarize values with one or more operations using the same interface as agg.

    Call syntax Expanding.aggregate([func])

  • Run a callable over the units of the object, such as rows, columns, groups, or windows. The receiver controls which units it passes to the callable.

    Call syntax Expanding.apply(func[, raw, engine, ...])

  • Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.

    Call syntax Expanding.corr([other, pairwise, ddof, ...])

  • Count nonmissing values along the selected axis or within each group or window.

    Call syntax Expanding.count([numeric_only])

  • Estimate how pairs of numeric inputs vary together from aligned observations.

    Call syntax Expanding.cov([other, pairwise, ddof, ...])

  • Get the value from the left edge of each growing window.

    Call syntax Expanding.first([numeric_only])

  • Estimate excess kurtosis, a statistic sensitive to heavy tails in a distribution.

    Call syntax Expanding.kurt([numeric_only])

  • Get the value from the right edge of each growing window.

    Call syntax Expanding.last([numeric_only])

  • Find the largest value in the selection, group or window.

    Call syntax Expanding.max([numeric_only, engine, ...])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax Expanding.mean([numeric_only, engine, ...])

    Example
    orders["units"].expanding(min_periods=1).mean()
  • Find the middle of the sorted values, averaging the central pair when there are two.

    Call syntax Expanding.median([numeric_only, engine, ...])

  • Find the smallest value in the selection, group or window.

    Call syntax Expanding.min([numeric_only, engine, ...])

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax Expanding.nunique([numeric_only])

  • Pass the current object to a callable while staying in a method chain.

    Call syntax Expanding.pipe(func, *args, **kwargs)

  • Estimate the value at a specified fraction of the sorted distribution.

    Call syntax Expanding.quantile(q[, interpolation, ...])

  • Assign positions in sorted order and choose how to handle ties.

    Call syntax Expanding.rank([method, ascending, pct, ...])

  • Calculate the standard error of the mean for the selected data.

    Call syntax Expanding.sem([ddof, numeric_only])

  • Estimate how asymmetric a numeric distribution is.

    Call syntax Expanding.skew([numeric_only])

  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax Expanding.std([ddof, numeric_only, engine, ...])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax Expanding.sum([numeric_only, engine, ...])

  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax Expanding.var([ddof, numeric_only, engine, ...])

  • Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.

    Call syntax ExponentialMovingWindow.corr([other, ...])

  • Estimate how pairs of numeric inputs vary together from aligned observations.

    Call syntax ExponentialMovingWindow.cov([other, ...])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax ExponentialMovingWindow.mean([numeric_only, ...])

    Example
    orders["units"].ewm(alpha=0.5).mean()
  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax ExponentialMovingWindow.std([bias, numeric_only])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax ExponentialMovingWindow.sum([numeric_only, ...])

  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax ExponentialMovingWindow.var([bias, numeric_only])

  • Summarize values with one or more operations using the same interface as agg.

    Call syntax Rolling.aggregate([func])

  • Run a callable over the units of the object, such as rows, columns, groups, or windows. The receiver controls which units it passes to the callable.

    Call syntax Rolling.apply(func[, raw, engine, ...])

  • Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.

    Call syntax Rolling.corr([other, pairwise, ddof, ...])

  • Count nonmissing values along the selected axis or within each group or window.

    Call syntax Rolling.count([numeric_only])

  • Estimate how pairs of numeric inputs vary together from aligned observations.

    Call syntax Rolling.cov([other, pairwise, ddof, ...])

  • Get the value from the left edge of each moving window.

    Call syntax Rolling.first([numeric_only])

  • Estimate excess kurtosis, a statistic sensitive to heavy tails in a distribution.

    Call syntax Rolling.kurt([numeric_only])

  • Get the value from the right edge of each moving window.

    Call syntax Rolling.last([numeric_only])

  • Find the largest value in the selection, group or window.

    Call syntax Rolling.max([numeric_only, engine, ...])

  • Calculate the arithmetic mean of values in the selection, group or window.

    Call syntax Rolling.mean([numeric_only, engine, ...])

  • Find the middle of the sorted values, averaging the central pair when there are two.

    Call syntax Rolling.median([numeric_only, engine, ...])

  • Find the smallest value in the selection, group or window.

    Call syntax Rolling.min([numeric_only, engine, ...])

  • Count distinct values. Set dropna=False to count missing values where supported.

    Call syntax Rolling.nunique([numeric_only])

  • Pass the current object to a callable while staying in a method chain.

    Call syntax Rolling.pipe(func, *args, **kwargs)

  • Estimate the value at a specified fraction of the sorted distribution.

    Call syntax Rolling.quantile(q[, interpolation, ...])

  • Assign positions in sorted order and choose how to handle ties.

    Call syntax Rolling.rank([method, ascending, pct, ...])

  • Calculate the standard error of the mean for the selected data.

    Call syntax Rolling.sem([ddof, numeric_only])

  • Estimate how asymmetric a numeric distribution is.

    Call syntax Rolling.skew([numeric_only])

  • Measure spread as the square root of variance. Use ddof to choose the divisor convention.

    Call syntax Rolling.std([ddof, numeric_only, engine, ...])

  • Add values along an axis or inside each group or window. Use min_count where supported to require usable observations.

    Call syntax Rolling.sum([numeric_only, engine, ...])

    Example
    orders["units"].rolling(2, min_periods=1).sum()
  • Estimate variance, the spread around the mean. ddof controls the divisor.

    Call syntax Rolling.var([ddof, numeric_only, engine, ...])

  • Average values in each rolling window using its configured weights.

    Call syntax Window.mean([numeric_only])

  • Calculate weighted standard deviation within each rolling window.

    Call syntax Window.std([ddof, numeric_only])

  • Total the values in each rolling window after applying its configured weights.

    Call syntax Window.sum([numeric_only])

  • Calculate weighted variance within each rolling window.

    Call syntax Window.var([ddof, numeric_only])

Missing values (2)
  • pandas.NAdata

    Represent a missing scalar in pandas nullable dtypes such as Int64 and boolean.

  • pandas.NaTdata

    Represent a missing datetime, timedelta, or period value.

Styling (42)
Plotting (12)
  • Plot each record as a curve created from its numeric features and optionally color curves by class.

    Call syntax andrews_curves(frame, class_column[, ax, ...])

  • Plot the correlation of a series with itself across multiple lags.

    Call syntax autocorrelation_plot(series[, ax])

  • Plot sample statistics for repeated bootstrap resamples to explore their variation.

    Call syntax bootstrap_plot(series[, fig, size, samples])

  • Draw box plots to compare medians, spread and possible outliers.

    Call syntax boxplot(data[, column, by, ax, fontsize, ...])

  • Remove the pandas date converters from Matplotlib's registry.

    Call syntax deregister_matplotlib_converters()

  • Plot observations against earlier observations to reveal serial patterns.

    Call syntax lag_plot(series[, lag, ax])

  • Plot each observation as a line across multiple variable axes, grouped by class.

    Call syntax parallel_coordinates(frame, class_column[, ...])

  • pandas.plotting.plot_paramsdata
  • Place observations inside a circle according to their relative values across feature anchors.

    Call syntax radviz(frame, class_column[, ax, color, ...])

  • Register converters that let Matplotlib plot pandas-specific time values.

    Call syntax register_matplotlib_converters()

  • Draw pairwise scatter plots and univariate plots for numeric DataFrame columns.

    Call syntax scatter_matrix(frame[, alpha, figsize, ax, ...])

  • Add a table of pandas values to a Matplotlib axes.

    Call syntax table(ax, data, **kwargs)

Options and settings (6)
  • Display an option's purpose, default and current value.

    Call syntax pd.describe_option([pat, _print_desc])

  • Read the current value of a pandas option.

    Call syntax pd.get_option(pat)

    Example
    pd.get_option("display.max_rows")
  • Temporarily override options inside a with block and restore them on exit.

    Call syntax pd.option_context(*args)

    Example
    with pd.option_context("display.max_rows", 4):
        print(orders)
  • Restore one or more pandas options to their default values.

    Call syntax pd.reset_option(pat)

  • Set a floating-point display formatter based on powers of 1000.

    Call syntax pd.set_eng_float_format([accuracy, use_eng_prefix])

  • Change one or more pandas configuration values.

    Call syntax pd.set_option(*args)

Extensions (57)
Testing, errors, and warnings (52)
  • pandas.errors.AbstractMethodErrorexception
  • pandas.errors.AttributeConflictWarningexception
  • pandas.errors.CategoricalConversionWarningexception
  • pandas.errors.ChainedAssignmentErrorexception
  • pandas.errors.ClosedFileErrorexception
  • pandas.errors.CSSWarningexception
  • pandas.errors.DatabaseErrorexception
  • pandas.errors.DataErrorexception
  • pandas.errors.DtypeWarningexception
  • pandas.errors.DuplicateLabelErrorexception
  • pandas.errors.EmptyDataErrorexception
  • pandas.errors.IncompatibilityWarningexception
  • pandas.errors.IncompatibleFrequencyexception
  • pandas.errors.IndexingErrorexception
  • pandas.errors.IntCastingNaNErrorexception
  • pandas.errors.InvalidColumnNameexception
  • pandas.errors.InvalidComparisonexception
  • pandas.errors.InvalidIndexErrorexception
  • pandas.errors.InvalidVersionexception
  • pandas.errors.LossySetitemErrorexception
  • pandas.errors.MergeErrorexception
  • pandas.errors.NoBufferPresentexception
  • pandas.errors.NullFrequencyErrorexception
  • pandas.errors.NumbaUtilErrorexception
  • pandas.errors.NumExprClobberingErrorexception
  • pandas.errors.OptionErrorexception
  • pandas.errors.OutOfBoundsDatetimeexception
  • pandas.errors.OutOfBoundsTimedeltaexception
  • pandas.errors.Pandas4Warningexception
  • pandas.errors.Pandas5Warningexception
  • pandas.errors.PandasChangeWarningexception
  • pandas.errors.PandasDeprecationWarningexception
  • pandas.errors.PandasFutureWarningexception
  • pandas.errors.PandasPendingDeprecationWarningexception
  • pandas.errors.ParserErrorexception
  • pandas.errors.ParserWarningexception
  • pandas.errors.PerformanceWarningexception
  • pandas.errors.PossibleDataLossErrorexception
  • pandas.errors.PossiblePrecisionLossexception
  • pandas.errors.PyperclipExceptionexception
  • pandas.errors.PyperclipWindowsExceptionexception
  • pandas.errors.SpecificationErrorexception
  • pandas.errors.UndefinedVariableErrorexception
  • pandas.errors.UnsortedIndexErrorexception
  • pandas.errors.UnsupportedFunctionCallexception
  • pandas.errors.ValueLabelTypeMismatchexception
  • Print environment and dependency versions for debugging or bug reports.

    Call syntax pd.show_versions([as_json])

  • pandas.testfunction

    Run the installed pandas test suite with pytest.

    Call syntax pd.test([extra_args, run_doctests])

  • Raise AssertionError when two extension arrays fail the equality checks.

    Call syntax testing.assert_extension_array_equal(left, right)

  • Compare expected and actual DataFrames in a test, with options for labels, dtypes and numeric tolerances.

    Call syntax testing.assert_frame_equal(left, right[, ...])

    Example
    pd.testing.assert_frame_equal(orders, orders.copy())
  • Compare two indexes and raise AssertionError when the configured equality checks fail.

    Call syntax testing.assert_index_equal(left, right[, ...])

  • Compare two Series in a test, including their values, labels and configured metadata checks.

    Call syntax testing.assert_series_equal(left, right[, ...])

    Example
    pd.testing.assert_series_equal(orders["units"], orders["units"].copy())
Typing aliases (71)
  • pandas.api.typing.aliasesmodule
  • pandas.api.typing.aliases.AggFuncTypetype
  • pandas.api.typing.aliases.AlignJointype
  • pandas.api.typing.aliases.AnyAlltype
  • pandas.api.typing.aliases.AnyArrayLiketype
  • pandas.api.typing.aliases.ArrayLiketype
  • pandas.api.typing.aliases.AstypeArgtype
  • pandas.api.typing.aliases.Axestype
  • pandas.api.typing.aliases.Axistype
  • pandas.api.typing.aliases.ColspaceArgTypetype
  • pandas.api.typing.aliases.CompressionOptionstype
  • pandas.api.typing.aliases.CorrelationMethodtype
  • pandas.api.typing.aliases.CSVEnginetype
  • pandas.api.typing.aliases.DropKeeptype
  • pandas.api.typing.aliases.Dtypetype
  • pandas.api.typing.aliases.DtypeArgtype
  • pandas.api.typing.aliases.DtypeBackendtype
  • pandas.api.typing.aliases.DtypeObjtype
  • pandas.api.typing.aliases.ExcelWriterIfSheetExiststype
  • pandas.api.typing.aliases.ExcelWriterMergeCellstype
  • pandas.api.typing.aliases.FilePathtype
  • pandas.api.typing.aliases.FillnaOptionstype
  • pandas.api.typing.aliases.FloatFormatTypetype
  • pandas.api.typing.aliases.FormattersTypetype
  • pandas.api.typing.aliases.FromDictOrienttype
  • pandas.api.typing.aliases.HTMLFlavorstype
  • pandas.api.typing.aliases.IgnoreRaisetype
  • pandas.api.typing.aliases.IndexLabeltype
  • pandas.api.typing.aliases.InterpolateOptionstype
  • pandas.api.typing.aliases.IntervalClosedTypetype
  • pandas.api.typing.aliases.IntervalLeftRighttype
  • pandas.api.typing.aliases.JoinHowtype
  • pandas.api.typing.aliases.JoinValidatetype
  • pandas.api.typing.aliases.JSONEnginetype
  • pandas.api.typing.aliases.JSONSerializabletype
  • pandas.api.typing.aliases.ListLiketype
  • pandas.api.typing.aliases.MergeHowtype
  • pandas.api.typing.aliases.MergeValidatetype
  • pandas.api.typing.aliases.NaPositiontype
  • pandas.api.typing.aliases.NsmallestNlargestKeeptype
  • pandas.api.typing.aliases.OpenFileErrorstype
  • pandas.api.typing.aliases.Orderedtype
  • pandas.api.typing.aliases.ParquetCompressionOptionstype
  • pandas.api.typing.aliases.QuantileInterpolationtype
  • pandas.api.typing.aliases.ReadBuffertype
  • pandas.api.typing.aliases.ReadCsvBuffertype
  • pandas.api.typing.aliases.ReadPickleBuffertype
  • pandas.api.typing.aliases.ReindexMethodtype
  • pandas.api.typing.aliases.Scalartype
  • pandas.api.typing.aliases.ScalarIndexertype
  • pandas.api.typing.aliases.SequenceIndexertype
  • pandas.api.typing.aliases.SequenceNotStrtype
  • pandas.api.typing.aliases.SliceTypetype
  • pandas.api.typing.aliases.SortKindtype
  • pandas.api.typing.aliases.StorageOptionstype
  • pandas.api.typing.aliases.Suffixestype
  • pandas.api.typing.aliases.TakeIndexertype
  • pandas.api.typing.aliases.TimeAmbiguoustype
  • pandas.api.typing.aliases.TimedeltaConvertibleTypestype
  • pandas.api.typing.aliases.TimeGrouperOrigintype
  • pandas.api.typing.aliases.TimeNonexistenttype
  • pandas.api.typing.aliases.TimestampConvertibleTypestype
  • pandas.api.typing.aliases.TimeUnittype
  • pandas.api.typing.aliases.ToStataByteordertype
  • pandas.api.typing.aliases.ToTimestampHowtype
  • pandas.api.typing.aliases.UpdateJointype
  • pandas.api.typing.aliases.UsecolsArgTypetype
  • pandas.api.typing.aliases.WindowingRankTypetype
  • pandas.api.typing.aliases.WriteBuffertype
  • pandas.api.typing.aliases.WriteExcelBuffertype
  • pandas.api.typing.aliases.XMLParserstype

Official references