describe causes a fatal Rust thread panic when the DataFrame contains a datetime column with a timezone.
Reproduction
df = Polars::DataFrame.new({
"a" => [1, 2, 3],
"ts" => Polars::Series.new("ts", [Time.utc(2026, 1, 1), Time.utc(2026, 1, 2), Time.utc(2026, 1, 3)])
.cast(Polars::Datetime.new("ms", "Europe/London")),
})
df.describe
thread '<unnamed>' panicked at ext/polars/src/conversion/datetime.rs:11:10:
called `Result::unwrap()` on an `Err` value: Error(Exception(#<Polars::Todo: Polars::Todo>))
Cause
_to_ruby_datetime in lib/polars/utils/convert.rb raises Todo for non-UTC timezones. The Rust caller in datetime_to_rb_object calls .unwrap() on the funcall result, turning the Ruby exception into a fatal panic.
describecauses a fatal Rust thread panic when theDataFramecontains a datetime column with a timezone.Reproduction
Cause
_to_ruby_datetimein lib/polars/utils/convert.rb raises Todo for non-UTC timezones. The Rust caller indatetime_to_rb_objectcalls.unwrap()on the funcall result, turning the Ruby exception into a fatal panic.