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

feat: add support for pandas is_numeric API change #871

Merged
merged 4 commits into from
Apr 6, 2023

Conversation

ioanaif
Copy link
Collaborator

@ioanaif ioanaif commented Apr 6, 2023

No description provided.

@ioanaif ioanaif requested a review from jpivarski April 6, 2023 15:39
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

Awesome! And I just verified that the full path to this available without having to explicitly import submodules within Pandas (i.e. it didn't work "by accident" this time and would fail later).

>>> import pandas
>>> pandas.__version__
'2.0.0'
>>> pandas.api.types.is_any_real_numeric_dtype
<function is_any_real_numeric_dtype at 0x7fd0a7fe0ea0>

Also,

>>> import pandas
>>> pandas.__version__
'1.5.3'
>>> pandas.api.types.is_any_real_numeric_dtype
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pandas.api.types' has no attribute 'is_any_real_numeric_dtype'

It could just check AttributeError, not both AttributeError and ImportError, but this is okay.

You can merge when ready. (Looks like you're already ready.)

@ioanaif
Copy link
Collaborator Author

ioanaif commented Apr 6, 2023

I made the change to return the correct function based on the version, so that it is less restrictive.

@ioanaif ioanaif requested a review from jpivarski April 6, 2023 15:51
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

These are all improvements! Go ahead and merge. I think your other PR needs this, and then after that's done, I can start a release. Am I forgetting anything?

@ioanaif
Copy link
Collaborator Author

ioanaif commented Apr 6, 2023

Just these two PRs #871 and #870.

@ioanaif ioanaif merged commit 94435aa into main Apr 6, 2023
@ioanaif ioanaif deleted the ioanaif/feat-add-panda-support-is-numeric branch April 6, 2023 16:02
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.

None yet

2 participants