df.at | DataFrame.at reads or writes one cell using a row-label and column-label pair. It is the label-based scalar counterpart to positional iat. |
df.iat | DataFrame.iat reads or writes one cell using integer row and column positions. It is the scalar counterpart to broader positional selection with iloc. |
df.tail | Returns the last rows of a DataFrame by positional order. It selects five rows by default and supports positive or negative values of n. |
df.sample | Randomly selects rows or columns from a DataFrame by count or fraction. Sampling can be weighted, repeated, made reproducible, and returned with a reset index. |
df.query | Filters a DataFrame using a boolean expression written as a string. The expression can use DataFrame columns and configurable evaluation context, parser, and engine settings. |
df.filter | DataFrame.filter selects rows or columns by their labels using exact names, substring matching, or regular expressions. It does not inspect the values in the DataFrame. |
df.where | Module |
df.mask | DataFrame.mask replaces values where a condition is True and keeps values where it is False. Replacement values come from other, or from dtype-appropriate nulls when other is omitted. |
df.isin | Returns a boolean DataFrame indicating whether each cell's value is present in the supplied iterable, Series, DataFrame, or dictionary. Input type determines whether matching is global, column-specific, or label-aligned. |
df.nlargest | Returns the rows with the largest values in specified DataFrame columns, ordered descending. It supports configurable handling of ties through keep. |
df.nsmallest | Returns the first n DataFrame rows with the smallest values in one or more columns, ordered ascending. Other columns are included but do not influence ranking. |
df.applymap | DataFrame.applymap applies a scalar-to-scalar callable to every DataFrame element and returns a transformed DataFrame. It is deprecated; use DataFrame.map instead. |
df.assign | DataFrame.assign creates or replaces columns and returns a new DataFrame containing the original columns plus the results. Values may be direct data or callables evaluated against the DataFrame. |
df.agg | DataFrame.agg applies one or more aggregation operations over a selected axis. It supports single operations, lists of operations, per-column dictionaries, and named aggregations. |
df.transform | DataFrame.transform applies a function along columns or rows and returns transformed data while preserving the DataFrame’s axis shape. It supports callables, function names, lists, and label-based mappings. |
df.pivot | Reshapes a DataFrame into a matrix using selected fields for its index, columns, and values. It does not aggregate duplicate index-column combinations. |
df.stack | Reshapes a DataFrame by moving selected column levels into the index. The result is a Series for single-level columns or a DataFrame when remaining column levels exist. |
df.unstack | Reshapes selected index levels into columns. MultiIndex inputs produce a DataFrame; a regular index produces a Series. |
df.merge | Combines a DataFrame with another DataFrame or named Series using a database-style join. It matches column and/or index keys and supports inner, outer, left, right, cross, and anti-join strategies. |
df.join | Module |
df.sort_index | Module |
df.rank | DataFrame.rank assigns numerical ranks along columns by default or across rows when requested. It supports configurable tie, missing-value, direction, numeric-column, and percentile behavior. |
df.rename | Rename a DataFrame’s column labels, index labels, or both with mappings or callables. Unmentioned labels stay unchanged by default, and the operation returns a new DataFrame unless inplace=True. |
df.drop | DataFrame.drop removes selected labels from rows or columns. Use index= or columns= for readable, axis-free calls; it returns a new DataFrame unless inplace=True. |
df.drop_duplicates | Remove duplicate rows from a DataFrame, optionally judging duplicates by selected columns. Choose whether to keep the first, last, or none of each duplicate group, and optionally reset the result index. |
df.replace | Replaces matching values in a DataFrame with specified alternatives. It supports scalar, list, dictionary, and regular-expression-based replacements, and returns a new frame unless inplace=True. |
df.astype | DataFrame.astype casts an entire DataFrame to one dtype or applies dtypes column by column through a mapping. Invalid conversions raise by default, with errors='ignore' available to suppress them. |
df.round | Rounds numeric DataFrame columns to a chosen precision. Use an integer for uniform precision or a dict/Series for per-column precision. |
df.clip | DataFrame.clip constrains values to optional lower and upper thresholds, replacing out-of-range entries with the relevant boundary. Scalar or array-like thresholds are supported. |
df.cumsum | Computes cumulative sums along a DataFrame axis, returning an equally sized result. By default it accumulates down columns, skips missing values, and can optionally restrict the operation to numeric columns. |
df.rolling | Creates sliding windows over a DataFrame for moving calculations. Configure the window, required observations, label placement, weighting, timing column, evaluation spacing, and execution mode before applying an aggregation or transformation. |
df.resample | DataFrame.resample groups time-series data into frequency-based bins for frequency conversion or aggregation. Use a datetime-like index, or identify a datetime-like column or level with on or level. |
df.shift | DataFrame.shift moves values by a chosen number of periods, inserting missing values where needed. With freq, it advances date-like index labels without realigning the data. |
df.diff | Computes discrete differences between DataFrame elements, comparing with the previous row by default. Use periods to control the shift and axis to choose rows or columns. |
df.pct_change | Returns the fractional change between current and prior DataFrame values. By default it compares adjacent rows; multiply the result by 100 to express the change as a percentage. |
df.explode | Expands list-like values in one or more DataFrame columns into separate rows. Non-exploded columns are repeated, and the original index is retained unless you request a fresh one. |
df.to_excel | Writes a DataFrame to an Excel worksheet. It supports direct file output or coordinated multi-sheet workbooks through ExcelWriter. |
df.to_json | Serializes a DataFrame to JSON text or writes it to a specified destination. Orientation, date encoding, precision, index handling, line output, compression, and formatting are configurable. |
df.to_sql | Writes DataFrame records to a SQL database, creating, appending to, or replacing a table. It can control index storage, batching, column types, and insertion strategy. |
df.to_parquet | Writes a DataFrame in binary Parquet format, using an automatic or explicitly selected backend. It supports compression, index control, dataset partitioning, and filesystem-related options. |
df.to_dict | Converts a DataFrame into a dictionary-like structure whose shape is selected with orient. It can also use a custom mapping class and optionally omit index metadata for split or tight output. |
df.to_numpy | DataFrame.to_numpy converts a DataFrame’s values into a NumPy array without its index or column labels. It chooses a common dtype by default, while dtype, copy, and na_value provide explicit control. |
df.info | Print a concise diagnostic summary of a pandas DataFrame, including its index, columns, dtypes, non-null counts, and memory usage. Output is written to standard output unless redirected. |
df.dtypes | DataFrame.dtypes is a property that returns a Series describing the dtype of every column. The Series uses the DataFrame’s column labels as its index. |
df.isnull | Detect missing values in a DataFrame by returning a same-sized boolean mask. Missing entries are True, while other entries are False; isnull() is an alias for isna(). |
df.notnull | Detects which DataFrame elements are non-missing. It returns a same-sized boolean DataFrame, with True for present values and False for recognized NA values. |
df.nunique | DataFrame.nunique counts distinct values along an axis and returns a Series. It excludes NaN by default, and can count per row with axis=1 or include missing values with dropna=False. |
df.corr | Computes pairwise column correlations while excluding missing values. Supports Pearson, Kendall, Spearman, and custom callable methods. |
df.cov | Computes pairwise covariance among DataFrame columns and returns the results as a covariance matrix. Missing values are excluded, and min_periods can require a minimum number of observations per pair. |
df.memory_usage | Returns per-column memory usage in bytes, optionally including the index and deeper accounting for object-dtype values. DataFrame.info uses this measurement by default. |
df.duplicated | Returns a boolean Series identifying duplicate DataFrame rows. Compare all columns by default, or specify subset columns and choose whether to preserve the first, last, or none of each duplicate group. |
df.iterrows | Iterate over DataFrame rows as index-and-Series pairs. Each row is exposed as a Series, so its values may not retain the original column dtypes; itertuples() is generally faster and preserves types better. |
df.itertuples | Iterate through DataFrame rows as namedtuples, optionally including the index and choosing a custom tuple type name. Set name=None for ordinary tuples. |
df.eval | DataFrame.eval evaluates a string expression against DataFrame columns. It can compute results or assign derived columns, optionally mutating the original DataFrame. |
df.copy | Creates a new DataFrame from the caller’s data and indices. By default it copies them; deep=False creates a shallow copy, with Copy-on-Write protecting writes from affecting the other object. |
df.set_index | Sets DataFrame row labels from one or more existing columns or same-length arrays. It can replace the current index or add levels to it. |
df.reset_index | Resets a DataFrame's index to the default integer index. By default, the former index is retained as column data, but it can instead be discarded or selectively reset for a MultiIndex. |
df.reindex | Reindex a DataFrame to specified row and/or column labels, optionally filling newly introduced gaps. Missing labels become NaN by default or receive a supplied fill value. |
df.combine_first | Fills missing values in one DataFrame from corresponding non-missing values in another. The result uses the union of both DataFrames’ row and column indexes, while the first DataFrame takes precedence where both contain values. |
df.update | DataFrame.update mutates a DataFrame with aligned, non-missing values from another object. It preserves the target’s shape and can either overwrite populated cells or fill only missing ones. |
df.squeeze | Remove DataFrame axes of length one. Depending on the shape and selected axis, the result is a DataFrame, Series, or scalar. |
df.idxmax | Returns the label of the first maximum in each column or row of a DataFrame. Missing values are skipped by default, and the axis, missing-value handling, and numeric-column selection are configurable. |
df.idxmin | DataFrame.idxmin returns the label of the first minimum in each column or row. It skips missing values by default and can restrict processing to numeric columns. |
df.cummax | Returns the cumulative maximum along a DataFrame or Series axis. By default, it scans each column downward while preserving the input shape. |
df.cummin | Returns the cumulative minimum along a DataFrame axis, preserving the input shape. By default it operates down columns, skips missing values, and can optionally restrict processing to numeric and Boolean columns. |
df.expanding | Creates an expanding-window object for a DataFrame. Each subsequent position can aggregate all data available from the beginning through that position. |
df.ewm | Creates an exponentially weighted window for DataFrame calculations. Supply a decay definition and then apply an operation such as mean() or std(). |
df.interpolate | Fill missing DataFrame values by interpolation along an axis. The method supports controls for interpolation strategy, gap size, direction, region, and in-place updates. |
df.bfill | DataFrame.bfill fills missing values by propagating the next valid observation backward along an axis. It can limit the number and position of values filled, or modify the DataFrame in place. |
df.ffill | DataFrame.ffill fills missing values by carrying the preceding valid observation forward along an axis. Optional limits control how many values or which regions are filled. |