Series.quantile returns None with datetime type data #12448
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
import polars as pl
import datetime as dt
ts = pl.Series([dt.datetime(2023,10,3,3), dt.datetime(2023,11,1,2)])
print(ts.quantile(0.5))
Log output
Issue description
quantile function will return None if the input colume or series is datetime type. It works fine if I converted it into Int64 type.
Expected behavior
return a datetime of the same type of the input column
Installed versions
--------Version info---------
Polars: 0.19.13
Index type: UInt32
Platform: Linux-6.2.0-34-generic-x86_64-with-glibc2.35
Python: 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0]
----Optional dependencies----
adbc_driver_sqlite:
cloudpickle:
connectorx:
deltalake:
fsspec:
gevent:
matplotlib: 3.7.2
numpy: 1.26.0
openpyxl:
pandas: 2.1.1
pyarrow: 14.0.1
pydantic:
pyiceberg:
pyxlsb:
sqlalchemy:
xlsx2csv:
xlsxwriter:
The text was updated successfully, but these errors were encountered: