-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fixed DataFrame.__repr__ Type Error when column dtype is np.record (GH 48526) #48637
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bd811e2
BUG: Fixed repr type error when column in np.record
RaphSku a454c0f
Reallocated the test to proposed destination and test the repr of the…
RaphSku 34109e3
Merge branch 'main' of https://github.com/pandas-dev/pandas into fram…
RaphSku 8204a58
Merged main branch and switched to doc/v2.0.0.rst
RaphSku 25a9ab1
Merged main branch + resolved conflict
RaphSku 2ecf9a3
Merged main
RaphSku dd837ce
Assert has gone missing due to merge conflict
RaphSku 076814f
Merge branch 'main' of https://github.com/pandas-dev/pandas into fram…
RaphSku 3a15ab1
Added new function that handles np.recarrays in _isna_array
RaphSku 961ebf0
Addes 2 more tests + refined _isna_recarray_dtype + formatting fixed
RaphSku 4fb9443
Reworked isna_recarray_dtype method + Added test for inf value
RaphSku 923d29d
Pre-commit fix
RaphSku fdcdb57
Fixing typing
RaphSku 5c4c29f
Updating branch with upstream main branch
RaphSku 8275116
Updated branch with upstream main branch
RaphSku 396172c
Fixed formatting
RaphSku 145699f
Fixed pyright error
RaphSku File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm appears this function doesn't deal with output formatting? Why is the fixed specifically needed here?
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've put it there because when the dtype is a np.recarray, then
result = np.isnan(values)
incore/dtypes/missing.py
will be executed and np.isnan cannot be evaluated on a np.recarray, it will throw the error which was also described in the issue.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.
This fix still appears like a band-aid fix. pandas doesn't have great support for
np.recarray
s and it doesn't look like_isna_string_dtype
was specifically meant to deal with themThere 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.
Okay, then I have a look what one can do.
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.
@mroeschke
Since
_isna_string_dtype
is not meant to deal withnp.recarray
, I have introduced a function that deals with that, can you have a look and tell me if this is okay? Thanks.