Check that left and right Series are equal.
Whether to check the Series dtype is identical.
Whether to check the Index class, dtype and inferred_type are identical.
Whether to check the Series class is identical.
Whether to check the Series and Index names attribute.
Whether to compare number exactly.
Changed in version 2.2.0: Defaults to True for integer dtypes if none of check_exact, rtol and atol are specified.
Compare datetime-like which is comparable ignoring dtype.
Whether to compare internal Categorical exactly.
Whether to compare category order of internal Categoricals.
Whether to check the freq attribute on a DatetimeIndex or TimedeltaIndex.
Whether to check the flags attribute.
Relative tolerance. Only used when check_exact is False.
Absolute tolerance. Only used when check_exact is False.
Specify object name being compared, internally used to show appropriate assertion message.
Whether to check index equivalence. If False, then compare only values.
Added in version 1.3.0.
If True, ignore the order of the index. Must be False if check_index is False. Note: same labels must be with the same data.
Added in version 1.5.0.
Examples
>>> from pandas import testing as tm
>>> a = pd.Series([1, 2, 3, 4])
>>> b = pd.Series([1, 2, 3, 4])
>>> tm.assert_series_equal(a, b)
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.testing.assert_series_equal.html