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.

Exceptions and warnings

errors.DtypeWarningWarning raised when reading different dtypes in a column from a file.
errors.EmptyDataErrorException that is thrown in pd.read_csv (by both the C and Python engines) when empty data or header is encountered.
errors.OutOfBoundsDatetime
errors.ParserErrorException that is raised by an error encountered in parsing file contents.
errors.ParserWarningWarning raised when reading a file that doesn’t use the default ‘c’ parser.
errors.PerformanceWarningWarning raised when there is a possible performance impact.
errors.UnsortedIndexErrorError raised when attempting to get a slice of a MultiIndex, and the index has not been lexsorted.
errors.UnsupportedFunctionCallException raised when attempting to call a numpy function on a pandas object, but that function is not supported by the object e.g.
api.types.union_categoricals(to_union[, …])Combine list-like of Categorical-like, unioning categories.
api.types.infer_dtype()Efficiently infer the type of a passed val, or list-like array of values.
api.types.pandas_dtype(dtype)Convert input into a pandas only dtype object or a numpy dtype object.

Dtype introspection

api.types.is_bool_dtype(arr_or_dtype)Check whether the provided array or dtype is of a boolean dtype.
api.types.is_categorical_dtype(arr_or_dtype)Check whether an array-like or dtype is of the Categorical dtype.
api.types.is_complex_dtype(arr_or_dtype)Check whether the provided array or dtype is of a complex dtype.
api.types.is_datetime64_any_dtype(arr_or_dtype)Check whether the provided array or dtype is of the datetime64 dtype.
api.types.is_datetime64_dtype(arr_or_dtype)Check whether an array-like or dtype is of the datetime64 dtype.
api.types.is_datetime64_ns_dtype(arr_or_dtype)Check whether the provided array or dtype is of the datetime64[ns] dtype.
api.types.is_datetime64tz_dtype(arr_or_dtype)Check whether an array-like or dtype is of a DatetimeTZDtype dtype.
api.types.is_extension_type(arr)Check whether an array-like is of a pandas extension class instance.
api.types.is_extension_array_dtype(arr_or_dtype)Check if an object is a pandas extension array type.
api.types.is_float_dtype(arr_or_dtype)Check whether the provided array or dtype is of a float dtype.
api.types.is_int64_dtype(arr_or_dtype)Check whether the provided array or dtype is of the int64 dtype.
api.types.is_integer_dtype(arr_or_dtype)Check whether the provided array or dtype is of an integer dtype.
api.types.is_interval_dtype(arr_or_dtype)Check whether an array-like or dtype is of the Interval dtype.
api.types.is_numeric_dtype(arr_or_dtype)Check whether the provided array or dtype is of a numeric dtype.
api.types.is_object_dtype(arr_or_dtype)Check whether an array-like or dtype is of the object dtype.
api.types.is_period_dtype(arr_or_dtype)Check whether an array-like or dtype is of the Period dtype.
api.types.is_signed_integer_dtype(arr_or_dtype)Check whether the provided array or dtype is of a signed integer dtype.
api.types.is_string_dtype(arr_or_dtype)Check whether the provided array or dtype is of the string dtype.
api.types.is_timedelta64_dtype(arr_or_dtype)Check whether an array-like or dtype is of the timedelta64 dtype.
api.types.is_timedelta64_ns_dtype(arr_or_dtype)Check whether the provided array or dtype is of the timedelta64[ns] dtype.
api.types.is_unsigned_integer_dtype(arr_or_dtype)Check whether the provided array or dtype is of an unsigned integer dtype.
api.types.is_sparse(arr)Check whether an array-like is a 1-D pandas sparse array.

Iterable introspection

api.types.is_dict_like(obj)Check if the object is dict-like.
api.types.is_file_like(obj)Check if the object is a file-like object.
api.types.is_list_like()Check if the object is list-like.
api.types.is_named_tuple(obj)Check if the object is a named tuple.
api.types.is_iterator(obj)Check if the object is an iterator.

Scalar introspection

api.types.is_bool()
api.types.is_categorical(arr)Check whether an array-like is a Categorical instance.
api.types.is_complex()
api.types.is_datetimetz(arr)(DEPRECATED) Check whether an array-like is a datetime array-like with a timezone component in its dtype.
api.types.is_float()
api.types.is_hashable(obj)Return True if hash(obj) will succeed, False otherwise.
api.types.is_integer()
api.types.is_interval()
api.types.is_number(obj)Check if the object is a number.
api.types.is_period(arr)(DEPRECATED) Check whether an array-like is a periodical index.
api.types.is_re(obj)Check if the object is a regex pattern instance.
api.types.is_re_compilable(obj)Check if the object can be compiled into a regex pattern instance.
api.types.is_scalar()Return True if given value is scalar.