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

[FEA] Expose a Decimal32Dtype in cuDF Python #8218

Closed
shwina opened this issue May 11, 2021 · 0 comments · Fixed by #8438
Closed

[FEA] Expose a Decimal32Dtype in cuDF Python #8218

shwina opened this issue May 11, 2021 · 0 comments · Fixed by #8438
Assignees
Labels
feature request New feature or request Python Affects Python cuDF API.

Comments

@shwina
Copy link
Contributor

shwina commented May 11, 2021

libcudf has both a 32-bit and 64-bit decimal type, but we only expose a Decimal64Dtype in Python. There's no reason we shouldn't also expose a Decimal32Dtype and corresponding column type.

@shwina shwina added feature request New feature or request Needs Triage Need team to review and classify Python Affects Python cuDF API. labels May 11, 2021
@shwina shwina removed the Needs Triage Need team to review and classify label May 11, 2021
@skirui-source skirui-source self-assigned this Jun 1, 2021
rapids-bot bot pushed a commit that referenced this issue Jun 29, 2021
Fixes: #8218

Similarly to libcudf's 64-bit decimal type,  this PR exposes the `Decimal32Dtype `and its corresponding `Decimal32Column` type.  Following this implementation, user can create a series or dataframe with `decimal32` dtype. 
Note: Only `to_arrow` and `from_arrow` methods are currently being supported. 



**Example:** 
```
>>> import cudf
>>> s = cudf.Series([1,2,3,4], dtype=cudf.Decimal32Dtype(precision=8, scale=2))
>>> s
0    1.00
1    2.00
2    3.00
3    4.00
dtype: decimal32
```

Authors:
  - Sheilah Kirui (https://github.com/skirui-source)

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

URL: #8438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants