Skip to content
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

WIP/DEPR: DataFrame reductions match Series behavior #36133

Closed
wants to merge 1 commit into from

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Sep 5, 2020

#34479, #36076

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

cc @jorisvandenbossche this feels klunky, and the axis==1 part im pretty unsure of. how would you approach this?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be more explicit in the check when to do this?

"dtypes."
)
if axis == 0:
if self.dtypes.apply(check_func).any():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know of other ops where this is a problem, or only any/all ? Otherwise I would also explicitly check this first.

)
msg = (
"In a future version, DataFrame reduction operations with "
"ExtensionDtype or ObjectDtype will be performed column-wise. "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ExtensionDtype or ObjectDtype will be performed column-wise. "
"datetime/timedelta, extension or object dtypes will be performed column-wise, and this operation will raise an error. "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants