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

Expose days_in_month function in libcudf and add python bindings #8892

Merged
merged 12 commits into from
Aug 6, 2021

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Jul 29, 2021

Closes #8681

This PR adds days_in_month function in libcudf and in cudf-python. It extracts the number of days of the month that the date is in.

Minor addition:

  • Adds examples to is_leap_year documentation
  • A previous issue with cuda10.x that precludes use of ymd.days() in add_calendrical_months_functor is now fixed because we dropped support for cuda10.x.

@github-actions github-actions bot added Python Affects Python cuDF API. libcudf Affects libcudf (C++/CUDA) code. labels Jul 29, 2021
@isVoid isVoid marked this pull request as ready for review July 29, 2021 01:42
@isVoid isVoid requested review from a team as code owners July 29, 2021 01:42
@isVoid isVoid self-assigned this Jul 29, 2021
@isVoid isVoid added 3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Non-breaking change labels Jul 29, 2021
@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #8892 (5f3e23e) into branch-21.10 (18f7c01) will decrease coverage by 0.08%.
The diff coverage is n/a.

❗ Current head 5f3e23e differs from pull request most recent head e334ef7. Consider uploading reports for the commit e334ef7 to get more accurate results
Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #8892      +/-   ##
================================================
- Coverage         10.67%   10.59%   -0.09%     
================================================
  Files               110      116       +6     
  Lines             18271    19044     +773     
================================================
+ Hits               1951     2017      +66     
- Misses            16320    17027     +707     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/column.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/lists.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/numerical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/string.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/struct.py 0.00% <ø> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <ø> (ø)
python/cudf/cudf/core/frame.py 0.00% <ø> (ø)
... and 75 more

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 7032f47...e334ef7. Read the comment docs.

python/cudf/cudf/tests/test_datetime.py Outdated Show resolved Hide resolved
python/cudf/cudf/tests/test_datetime.py Outdated Show resolved Hide resolved
python/cudf/cudf/_lib/datetime.pyx Show resolved Hide resolved
@isVoid isVoid requested review from shwina and galipremsagar July 29, 2021 23:48
cpp/include/cudf/datetime.hpp Outdated Show resolved Hide resolved
cpp/include/cudf/datetime.hpp Outdated Show resolved Hide resolved
cpp/tests/datetime/datetime_ops_test.cpp Outdated Show resolved Hide resolved
cpp/tests/datetime/datetime_ops_test.cpp Outdated Show resolved Hide resolved
@isVoid isVoid requested a review from ttnghia July 30, 2021 17:47
cpp/include/cudf/datetime.hpp Outdated Show resolved Hide resolved
@isVoid isVoid 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 4, 2021
@isVoid
Copy link
Contributor Author

isVoid commented Aug 6, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 4b5853d into rapidsai:branch-21.10 Aug 6, 2021
shwina pushed a commit to shwina/cudf that referenced this pull request Aug 9, 2021
…apidsai#8892)

Closes rapidsai#8681 

This PR adds `days_in_month` function in libcudf and in cudf-python. It extracts the number of days of the month that the date is in.

Minor addition:
- Adds examples to `is_leap_year` documentation
- A previous issue with cuda10.x that precludes use of `ymd.days()` in `add_calendrical_months_functor` is now fixed because we dropped support for cuda10.x.

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Nghia Truong (https://github.com/ttnghia)
  - Karthikeyan (https://github.com/karthikeyann)

URL: rapidsai#8892
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 libcudf Affects libcudf (C++/CUDA) code. 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 days_in_month
5 participants