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.
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
cudf.dtype
function #8949cudf.dtype
function #8949Changes from 4 commits
60c7c87
5e50f52
367b743
d04a5f1
85351e9
3c9dd97
67cca8a
a10eae0
89ac918
acda2ee
64a3290
a62ab32
f79e59f
9dceb80
d0bef49
3eba47c
048629c
40736c4
550c7ba
1cfa67c
72d6304
c8925f5
26df99a
fec34d9
5fc19a9
11156f5
2a684be
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If someone does a
cudf.dtype('complex')
, I think we would end up returningnp.dtype('complex')
here, should we validate if the dtype exists in our cudf type map before returning?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.
Fixed - let me know if you think the way I'm handling unsupported NumPy types is OK
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 seems reasonable to me, as pandas is moving towards
object
as default type if no dtype is provided: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.
Can we now squeeze these two separate dtype calls into a single
cudf.dtype
call? or is there something specific about callingpd.api.types.pandas_dtype
first?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.
Fixed
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.
We probably want to test more inputs that don't translate to numpy dtypes, specifically more cudf- and pandas-specific extension types.
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.
The cuDF specific types (i.e., instances of
cudf._BaseDtype
) are less interesting since we just return those as-is. But I did add a few more tests.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.
Maybe also worth testing pandas interval/datetime/timedelta dtypes.
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.
Added interval cases, but as far as I know, Pandas uses numpy datetime/timedelta types as their dtype for
DatetimeIndex
/TimedeltaIndex
.