Skip to content

API: Revert changes to describe #33903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomAugspurger opened this issue Apr 30, 2020 · 2 comments · Fixed by #34798
Closed

API: Revert changes to describe #33903

TomAugspurger opened this issue Apr 30, 2020 · 2 comments · Fixed by #34798
Labels
Blocker Blocking issue or pull request for an upcoming release Compat pandas objects compatability with Numpy or Python functions
Milestone

Comments

@TomAugspurger
Copy link
Contributor

#30209 has some changes to describe for datelike data. I think the changes count as API breaking and should wait until a 2.0, possibly with a deprecation warning.

cc @david-cortes, @jreback.

master:

In [1]: import pandas as pd

In [2]: pd.Series(pd.date_range('2000', periods=10)).describe()
Out[2]:
count                     10
mean     2000-01-05 12:00:00
min      2000-01-01 00:00:00
25%      2000-01-03 06:00:00
50%      2000-01-05 12:00:00
75%      2000-01-07 18:00:00
max      2000-01-10 00:00:00
dtype: object

In [3]: pd.__version__
Out[3]: '1.1.0.dev0+1417.g12c9c626d'

1.0.2:

In [1]: import pandas as pd

In [2]: pd.Series(pd.date_range('2000', periods=10)).describe()
Out[2]:
count                      10
unique                     10
top       2000-01-08 00:00:00
freq                        1
first     2000-01-01 00:00:00
last      2000-01-10 00:00:00
dtype: object

In [3]: pd.__version__
Out[3]: '1.0.2'
@TomAugspurger TomAugspurger added Compat pandas objects compatability with Numpy or Python functions Blocker Blocking issue or pull request for an upcoming release labels Apr 30, 2020
@TomAugspurger TomAugspurger added this to the 1.1 milestone Apr 30, 2020
@jreback
Copy link
Contributor

jreback commented Apr 30, 2020

I guess, this is allowing new ops in M8. what exactly did this show up?

@TomAugspurger
Copy link
Contributor Author

Came up in a dask test asserting that the output of dask.dataframe's describe matches pandas.

I'd also be fine with a datetlike_is_numeric=None/True/False with a default of warning and giving the old output and an option to silence the warning by specifying True / False.

TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Jun 15, 2020
Adds the new behavior as a feature flag / deprecation.

Closes pandas-dev#33903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Blocking issue or pull request for an upcoming release Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants