Skip to content

BUG: DataFrame.quantile fails on datetime values #6965

Closed
@TomAugspurger

Description

@TomAugspurger
In [2]: df = DataFrame({'a': pd.to_datetime(['2010', '2011']), 'b': [0, 5]})

In [3]: df.quantile(.5, numeric_only=False)
Out[3]: 
a    1.278072e+18
b    1.278072e+18
dtype: float64

Series handles things fine.

We need to do a view('i8') on the date time array somewhere, but I had trouble just sticking it inside of the f that gets passed to data.apply(f, ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDatetimeDatetime data dtypeDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions