Skip to main content
`Ctrl`+`K`

# Testing

## Assertion 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.AbstractMethodError`(class_instance[, ...]) | Raise this error instead of NotImplementedError for abstract methods.
`errors.AttributeConflictWarning` | Warning raised when index attributes conflict when using HDFStore.
`errors.CategoricalConversionWarning` | Warning is raised when reading a partial labeled Stata file using a iterator.
`errors.ChainedAssignmentError` | Warning raised when trying to set using chained assignment.
`errors.ClosedFileError` | Exception is raised when trying to perform an operation on a closed HDFStore file.
`errors.CSSWarning` | Warning is raised when converting css styling fails.
`errors.DatabaseError` | Error is raised when executing sql with bad syntax or sql that throws an error.
`errors.DataError` | Exceptionn raised when performing an operation on non-numerical data.
`errors.DtypeWarning` | Warning raised when reading different dtypes in a column from a file.
`errors.DuplicateLabelError` | Error raised when an operation would introduce duplicate labels.
`errors.EmptyDataError` | Exception raised in `pd.read_csv` when empty data or header is encountered.
`errors.IncompatibilityWarning` | Warning raised when trying to use where criteria on an incompatible HDF5 file.
`errors.IndexingError` | Exception is raised when trying to index and there is a mismatch in dimensions.
`errors.InvalidColumnName` | Warning raised by to_stata the column contains a non-valid stata name.
`errors.InvalidComparison` | Exception is raised by _validate_comparison_value to indicate an invalid comparison.
`errors.InvalidIndexError` | Exception raised when attempting to use an invalid index key.
`errors.InvalidVersion` | An invalid version was found, users should refer to PEP 440.
`errors.IntCastingNaNError` | Exception raised when converting (`astype`) an array with NaN to an integer type.
`errors.LossySetitemError` | Raised when trying to do a __setitem__ on an np.ndarray that is not lossless.
`errors.MergeError` | Exception raised when merging data.
`errors.NoBufferPresent` | Exception is raised in _get_data_buffer to signal that there is no requested buffer.
`errors.NullFrequencyError` | Exception raised when a `freq` cannot be null.
`errors.NumbaUtilError` | Error raised for unsupported Numba engine routines.
`errors.NumExprClobberingError` | Exception raised when trying to use a built-in numexpr name as a variable name.
`errors.OptionError` | Exception raised for pandas.options.
`errors.OutOfBoundsDatetime` | Raised when the datetime is outside the range that can be represented.
`errors.OutOfBoundsTimedelta` | Raised when encountering a timedelta value that cannot be represented.
`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.PossibleDataLossError` | Exception raised when trying to open a HDFStore file when already opened.
`errors.PossiblePrecisionLoss` | Warning raised by to_stata on a column with a value outside or equal to int64.
`errors.PyperclipException` | Exception raised when clipboard functionality is unsupported.
`errors.PyperclipWindowsException`(message) | Exception raised when clipboard functionality is unsupported by Windows.
`errors.SettingWithCopyError` | Exception raised when trying to set on a copied slice from a `DataFrame`.
`errors.SettingWithCopyWarning` | Warning raised when trying to set on a copied slice from a `DataFrame`.
`errors.SpecificationError` | Exception raised by `agg` when the functions are ill-specified.
`errors.UndefinedVariableError`(name[, is_local]) | Exception raised by `query` or `eval` when using an undefined variable name.
`errors.UnsortedIndexError` | Error raised when slicing a MultiIndex which has not been lexsorted.
`errors.UnsupportedFunctionCall` | Exception raised when attempting to call a unsupported numpy function.
`errors.ValueLabelTypeMismatch` | Warning raised by to_stata on a category column that contains non-string values.

## Bug report function

`show_versions`([as_json]) | Provide useful information, important for bug reports.

## Test suite runner

`test`([extra_args, run_doctests]) | Run the pandas test suite using pytest.