General utility functions

Working with options

describe_option(pat[, _print_desc])

Prints the description for one or more registered options.

reset_option(pat)

Reset one or more options to their default value.

get_option(pat)

Retrieves the value of the specified option.

set_option(pat, value)

Sets the value of the specified option.

option_context(*args)

Context manager to temporarily set options in the with statement context.

Testing functions

testing.assert_frame_equal(left, right[, …])

Check that left and right DataFrame are equal.

testing.assert_series_equal(left, right[, …])

Check that left and right Series are equal.

testing.assert_index_equal(left, right[, …])

Check that left and right Index are equal.

testing.assert_extension_array_equal(left, right)

Check that left and right ExtensionArrays are equal.

Exceptions and warnings

errors.AccessorRegistrationWarning

Warning for attribute conflicts in accessor registration.

errors.DtypeWarning

Warning raised when reading different dtypes in a column from a file.

errors.EmptyDataError

Exception that is thrown in pd.read_csv (by both the C and Python engines) when empty data or header is encountered.

errors.InvalidIndexError

Exception raised when attemping to use an invalid index key.

errors.MergeError

Error raised when problems arise during merging due to problems with input data.

errors.NullFrequencyError

Error raised when a null freq attribute is used in an operation that needs a non-null frequency, particularly DatetimeIndex.shift, TimedeltaIndex.shift, PeriodIndex.shift.

errors.NumbaUtilError

Error raised for unsupported Numba engine routines.

errors.OutOfBoundsDatetime

errors.OutOfBoundsTimedelta

Raised when encountering a timedelta value that cannot be represented as a timedelta64[ns].

errors.ParserError

Exception that is raised by an error encountered in parsing file contents.

errors.ParserWarning

Warning raised when reading a file that doesn’t use the default ‘c’ parser.

errors.PerformanceWarning

Warning raised when there is a possible performance impact.

errors.UnsortedIndexError

Error raised when attempting to get a slice of a MultiIndex, and the index has not been lexsorted.

errors.UnsupportedFunctionCall

Exception raised when attempting to call a numpy function on a pandas object, but that function is not supported by the object e.g.

Bug report function

show_versions([as_json])

Provide useful information, important for bug reports.