-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC/TST: Document numpy 2.0 support and add tests for string array #58202
Conversation
def test_np_string_array_object_cast(self, data): | ||
from numpy.dtypes import StringDType | ||
|
||
data["a"] = np.array(data["a"], dtype=StringDType()) |
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.
Curious what happens when dtype=StringDType()
is passed to pandas Series
or DataFrame
constructor? Fine if it doesn't work/converts to object but would be good to note if something unexpected happens
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.
I think it silently casts to object.
FWIW, I think the numpy fixed length strings also do this.
/preview |
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/58202/ |
I don't know where to ask: Is there a ETA for pandas 2.2.2 with numpy 2.0(rc) support? |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Release is expected to happen today. |
… add tests for string array
@lithomas1 Thanks for the prompt and quite pleasing response 😃 |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.