polars.Series.is_temporal#
- Series.is_temporal(excluding: OneOrMoreDataTypes | None = None) bool [source]#
Check if this Series datatype is temporal.
- 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