pola-rs/polars · error
date not implemented for {dt:?}
Error message
date not implemented for {dt:?} What it means
Series::into_time supports only Int64 (physical epoch representation) and Time dtypes; other dtypes hit the fallback panic naming the dtype. Means you called into_time on a series that is not a time or its Int64 physical form — cast first.
Source
Thrown at crates/polars-core/src/series/mod.rs:939
{
Ok(self)
},
dt => panic!("into_decimal({precision:?}, {scale}) not implemented for {dt:?}"),
}
}
#[cfg(feature = "dtype-time")]
pub fn into_time(self) -> Series {
match self.dtype() {
DataType::Int64 => self.i64().unwrap().clone().into_time().into_series(),
DataType::Time => self
.time()
.unwrap()
.physical()
.clone()
.into_time()
.into_series(),
dt => panic!("date not implemented for {dt:?}"),
}
}
pub fn into_date(self) -> Series {
#[cfg(not(feature = "dtype-date"))]
{
panic!("activate feature dtype-date")
}
#[cfg(feature = "dtype-date")]
match self.dtype() {
DataType::Int32 => self.i32().unwrap().clone().into_date().into_series(),
DataType::Date => self
.date()
.unwrap()
.physical()
.clone()
.into_date()
.into_series(),View on GitHub (pinned to 68506541d2)
Solutions
- Convert the series to Date only from supported dtypes (Date32/Int32/Datetime).
- Cast the source to a datetime or integer days representation first.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: This panic/expect fires when execution reaches an unguarded state described by: "date not implemented for {dt:?}". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.
Common situations: Encountered when input data or configuration does not meet the preconditions of the throwing code path ("date not implemented for {dt:?}"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.
AI-assisted analysis of pola-rs/polars@68506541d2 (2026-08-19).
Data as JSON: /api/errors/f59ee5963d703db3.
Report an issue: GitHub.