Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Oct 24, 2022
1 parent 23bb003 commit 2fc3b3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/cudf/source/user_guide/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ All data types in cuDF are [nullable](missing-data).
| Timedelta (duration) | `'timedelta[s]'`, `'timedelta[ms]'`, `'timedelta['us']`, `'timedelta[ns]'` |
| Category | {py:func}`cudf.CategoricalDtype` |
| String | `'object'` or `'string'` |
| Decimal | {py:func}`cudf.Decimal32Dtype`, {py:func}`cudf.Decimal64Dtype`, {py:func}`cudf.Decimal64Dtype` |
| Decimal | {py:func}`cudf.Decimal32Dtype`, {py:func}`cudf.Decimal64Dtype`, {py:func}`cudf.Decimal128Dtype` |
| List | {py:func}`cudf.ListDtype` |
| Struct | {py:func}`cudf.StructDtype` |

Expand Down
23 changes: 4 additions & 19 deletions python/cudf/cudf/core/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,10 @@ def deserialize(cls, header: dict, frames: list):
Examples
--------
{example}
>>> import cudf
>>> decimal{size}_dtype = cudf.Decimal{size}Dtype(precision=9, scale=2)
>>> decimal{size}_dtype
Decimal{size}Dtype(precision=9, scale=2)
""" # noqa: E501
)

Expand Down Expand Up @@ -794,12 +797,6 @@ def __hash__(self):
@doc_apply(
decimal_dtype_template.format(
size="32",
example="""
>>> import cudf
>>> decimal32_dtype = cudf.Decimal32Dtype(precision=9, scale=2)
>>> decimal32_dtype
Decimal32Dtype(precision=9, scale=2)
""",
)
)
class Decimal32Dtype(DecimalDtype):
Expand All @@ -811,12 +808,6 @@ class Decimal32Dtype(DecimalDtype):
@doc_apply(
decimal_dtype_template.format(
size="64",
example="""
>>> import cudf
>>> decimal64_dtype = cudf.Decimal64Dtype(precision=15, scale=3)
>>> decimal64_dtype
Decimal64Dtype(precision=15, scale=3)
""",
)
)
class Decimal64Dtype(DecimalDtype):
Expand All @@ -828,12 +819,6 @@ class Decimal64Dtype(DecimalDtype):
@doc_apply(
decimal_dtype_template.format(
size="128",
example="""
>>> import cudf
>>> decimal128_dtype = cudf.Decimal128Dtype(precision=32, scale=4)
>>> decimal128_dtype
Decimal128Dtype(precision=32, scale=4)
""",
)
)
class Decimal128Dtype(DecimalDtype):
Expand Down

0 comments on commit 2fc3b3d

Please sign in to comment.