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

Python binding for quarters #8862

Merged
merged 23 commits into from
Aug 10, 2021

Conversation

shaneding
Copy link
Contributor

Closes #8676.
This PR adds python bindings for #8779.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Jul 27, 2021
@shaneding shaneding changed the title Python binding for quarters [WIP] Python binding for quarters Jul 27, 2021
@shaneding shaneding added feature request New feature or request non-breaking Non-breaking change labels Jul 27, 2021
@shaneding shaneding changed the title [WIP] Python binding for quarters Python binding for quarters Jul 27, 2021
@shaneding shaneding marked this pull request as ready for review July 27, 2021 15:44
@shaneding shaneding requested a review from a team as a code owner July 27, 2021 15:44
@shaneding shaneding added the 3 - Ready for Review Ready for review by team label Jul 30, 2021
@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@115f3b6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #8862   +/-   ##
===============================================
  Coverage                ?   10.58%           
===============================================
  Files                   ?      116           
  Lines                   ?    19067           
  Branches                ?        0           
===============================================
  Hits                    ?     2018           
  Misses                  ?    17049           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 115f3b6...0502eeb. Read the comment docs.

@shaneding
Copy link
Contributor Author

rerun tests

python/cudf/cudf/core/series.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/series.py Outdated Show resolved Hide resolved
python/cudf/cudf/_lib/datetime.pyx Show resolved Hide resolved
python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
Co-authored-by: Michael Wang <isVoid@users.noreply.github.com>
@shaneding
Copy link
Contributor Author

rerun tests

2 similar comments
@shaneding
Copy link
Contributor Author

rerun tests

@shaneding
Copy link
Contributor Author

rerun tests

Copy link
Contributor

@isVoid isVoid left a comment

Choose a reason for hiding this comment

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

lgtm, good work!

Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

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

I think we could probably save some memory that would go un-used here.

@beckernick Is it a necessity, in this case, we should be matching pandas return dtype(i.e., int64)?

The related libcudf method also seems to be returning int16, instead of int8: https://github.com/rapidsai/cudf/pull/8779/files#diff-76e529bce1f51fca7ea3193f09c6e95906410a82bcc03a9271553b8527468052R218

@shaneding any reason why we choose int16 over the lowest possible dtype?

python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/series.py Outdated Show resolved Hide resolved
python/cudf/cudf/tests/test_datetime.py Outdated Show resolved Hide resolved
@shaneding
Copy link
Contributor Author

I think we could probably save some memory that would go un-used here.

@beckernick Is it a necessity, in this case, we should be matching pandas return dtype(i.e., int64)?

The related libcudf method also seems to be returning int16, instead of int8: https://github.com/rapidsai/cudf/pull/8779/files#diff-76e529bce1f51fca7ea3193f09c6e95906410a82bcc03a9271553b8527468052R218

@shaneding any reason why we choose int16 over the lowest possible dtype?

The main reason was because within datetime_ops.cu most operations returned an int16 so we decided to go with it for compatibility reasons, this was discussed in a thread earlier too.

python/cudf/cudf/core/index.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/series.py Outdated Show resolved Hide resolved
python/cudf/cudf/tests/test_datetime.py Outdated Show resolved Hide resolved
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Aug 10, 2021
@galipremsagar
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 05447ad into rapidsai:branch-21.10 Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge feature request New feature or request non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Series datetime quarter
5 participants