General functions#

Data manipulations#

melt(frame[, id_vars, value_vars, var_name, ...])

Unpivot a DataFrame from wide to long format, optionally leaving identifiers set.

pivot(data[, index, columns, values])

Return reshaped DataFrame organized by given index / column values.

pivot_table(data[, values, index, columns, ...])

Create a spreadsheet-style pivot table as a DataFrame.

crosstab(index, columns[, values, rownames, ...])

Compute a simple cross tabulation of two (or more) factors.

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

Bin values into discrete intervals.

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

Quantile-based discretization function.

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

Merge DataFrame or named Series objects with a database-style join.

merge_ordered(left, right[, on, left_on, ...])

Perform a merge for ordered data with optional filling/interpolation.

merge_asof(left, right[, on, left_on, ...])

Perform a merge by key distance.

concat(objs[, axis, join, ignore_index, ...])

Concatenate pandas objects along a particular axis.

get_dummies(data[, prefix, prefix_sep, ...])

Convert categorical variable into dummy/indicator variables.

from_dummies(data[, sep, default_category])

Create a categorical DataFrame from a DataFrame of dummy variables.

factorize(values[, sort, na_sentinel, ...])

Encode the object as an enumerated type or categorical variable.

unique(values)

Return unique values based on a hash table.

wide_to_long(df, stubnames, i, j[, sep, suffix])

Unpivot a DataFrame from wide to long format.

Top-level missing data#

isna(obj)

Detect missing values for an array-like object.

isnull(obj)

Detect missing values for an array-like object.

notna(obj)

Detect non-missing values for an array-like object.

notnull(obj)

Detect non-missing values for an array-like object.

Top-level dealing with numeric data#

to_numeric(arg[, errors, downcast])

Convert argument to a numeric type.

Top-level dealing with datetimelike data#

to_datetime(arg[, errors, dayfirst, ...])

Convert argument to datetime.

to_timedelta(arg[, unit, errors])

Convert argument to timedelta.

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

Return a fixed frequency DatetimeIndex.

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

Return a fixed frequency DatetimeIndex with business day as the default.

period_range([start, end, periods, freq, name])

Return a fixed frequency PeriodIndex.

timedelta_range([start, end, periods, freq, ...])

Return a fixed frequency TimedeltaIndex with day as the default.

infer_freq(index[, warn])

Infer the most likely frequency given the input index.

Top-level dealing with Interval data#

interval_range([start, end, periods, freq, ...])

Return a fixed frequency IntervalIndex.

Top-level evaluation#

eval(expr[, parser, engine, truediv, ...])

Evaluate a Python expression as a string using various backends.

Hashing#

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

Given a 1d array, return an array of deterministic integers.

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

Return a data hash of the Index/Series/DataFrame.

Importing from other DataFrame libraries#

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

Build a pd.DataFrame from any DataFrame supporting the interchange protocol.