polars.Series.equals#

Series.equals(
other: Series,
*,
check_dtypes: bool = False,
check_names: bool = False,
null_equal: bool = True,
) bool[source]#

Check whether the Series is equal to another Series.

Parameters:
other

Series to compare with.

check_dtypes

Require data types to match.

check_names

Require names to match.

null_equal

Consider null values as equal.

See also

assert_series_equal

Examples

>>> s1 = pl.Series("a", [1, 2, 3])
>>> s2 = pl.Series("b", [4, 5, 6])
>>> s1.equals(s1)
True
>>> s1.equals(s2)
False