# pandas.testing.assert_series_equal

pandas.testing.assert_series_equal(left, right, check_dtype=True, check_index_type='equiv', check_series_type=True, check_less_precise=NoDefault.no_default, check_names=True, check_exact=False, check_datetimelike_compat=False, check_categorical=True, check_category_order=True, check_freq=True, check_flags=True, rtol=1e-05, atol=1e-08, obj='Series', *, check_index=True)

  Check that left and right Series are equal.

  Parameters
    left Series
    right Series
    check_dtype bool, default True

      Whether to check the Series dtype is identical.

    check_index_type bool or {‘equiv’}, default ‘equiv’

      Whether to check the Index class, dtype and inferred_type are identical.

    check_series_type bool, default True

      Whether to check the Series class is identical.

    check_less_precise bool or int, default False

      Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare.

      When comparing two numbers, if the first number has magnitude less than 1e-5, we compare the two numbers directly and check whether they are equivalent within the specified precision. Otherwise, we compare the ratio of the second number to the first number and check whether it is equivalent to 1 within the specified precision.

      Deprecated since version 1.1.0: Use rtol and atol instead to define relative/absolute tolerance, respectively. Similar to `math.isclose()`.

    check_names bool, default True

      Whether to check the Series and Index names attribute.

    check_exact bool, default False

      Whether to compare number exactly.

    check_datetimelike_compat bool, default False

      Compare datetime-like which is comparable ignoring dtype.

    check_categorical bool, default True

      Whether to compare internal Categorical exactly.

    check_category_order bool, default True

      Whether to compare category order of internal Categoricals.

      New in version 1.0.2.

    check_freq bool, default True

      Whether to check the freq attribute on a DatetimeIndex or TimedeltaIndex.

      New in version 1.1.0.

    check_flags bool, default True

      Whether to check the flags attribute.

      New in version 1.2.0.

    rtol float, default 1e-5

      Relative tolerance. Only used when check_exact is False.

      New in version 1.1.0.

    atol float, default 1e-8

      Absolute tolerance. Only used when check_exact is False.

      New in version 1.1.0.

    obj str, default ‘Series’

      Specify object name being compared, internally used to show appropriate assertion message.

    check_index bool, default True

      Whether to check index equivalence. If False, then compare only values.

      New in version 1.3.0.

  Examples

      >>> from pandas.testing import assert_series_equal
      >>> a = pd.Series([1, 2, 3, 4])
      >>> b = pd.Series([1, 2, 3, 4])
      >>> assert_series_equal(a, b)