-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
BUG: DataFrame.min with skipna=True raises TypeError when column contains np.nan and datetime.date #62762
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
base: 2.3.x
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,64 @@ | |||
import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is already a test_reductions.py file
numeric_only: bool = False, | ||
**kwargs, | ||
): | ||
self.convert_date_na_columns() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't modify the dataframe.
def is_date_or_null_column(self, column: Series) -> bool: | ||
"""Check if a pandas Series contains only datetime.date objects or nulls.""" | ||
for value in column: | ||
from datetime import date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imports at the top of the file
for value in column: | ||
from datetime import date | ||
if not (isna(value) or isinstance(value, date)): | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib.is_date_array
This PR is targeting the wrong branch. It should be |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.