polars.Series.is_temporal#
- Series.is_temporal(excluding: OneOrMoreDataTypes | None = None) bool [source]#
Check if this Series datatype is temporal.
Deprecated since version 0.19.13: Use
Series.dtype.is_temporal()
instead.- Parameters:
- excluding
Optionally exclude one or more temporal dtypes from matching.
Examples
>>> from datetime import date >>> s = pl.Series([date(2021, 1, 1), date(2021, 1, 2), date(2021, 1, 3)]) >>> s.is_temporal() True >>> s.is_temporal(excluding=[pl.Date]) False