polars.Series.series_equal#

Series.series_equal(
other: Series,
*,
null_equal: bool = True,
strict: bool = False,
) bool[source]#

Check if series is equal with another Series.

Parameters:
other

Series to compare with.

null_equal

Consider null values as equal.

strict

Don’t allow different numerical dtypes, e.g. comparing pl.UInt32 with a pl.Int64 will return False.

Examples

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