You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Now that cuDF supports decimal columns it would be great to be able to cast to DecimalDtype from float or int datatypes.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/u00u7rh1e72hXfsipJ357/miniconda3/envs/rapids-gpu-bdb/lib/python3.7/site-packages/cudf/core/dataframe.py", line 1163, in astype
dtype=dtype, **kwargs
File "/home/u00u7rh1e72hXfsipJ357/miniconda3/envs/rapids-gpu-bdb/lib/python3.7/site-packages/cudf/core/column/column.py", line 1018, in astype
elif np.issubdtype(dtype, np.datetime64):
File "/home/u00u7rh1e72hXfsipJ357/miniconda3/envs/rapids-gpu-bdb/lib/python3.7/site-packages/numpy/core/numerictypes.py", line 388, in issubdtype
arg1 = dtype(arg1).type
TypeError: Cannot interpret 'Decimal64Dtype(precision=7, scale=2)' as a data type
Describe the solution you'd like
I would like to be able to convert float or int columns to decimal columns with the specified scale and precision
Describe alternatives you've considered
I've also found that:
This enables type conversions between `decimal` types and `int` types.
Closes#7440
Authors:
- @ChrisJar
Approvers:
- GALI PREM SAGAR (@galipremsagar)
URL: #7691
Is your feature request related to a problem? Please describe.
Now that cuDF supports
decimal
columns it would be great to be able to cast toDecimalDtype
fromfloat
orint
datatypes.For example:
This currently throws:
Describe the solution you'd like
I would like to be able to convert
float
orint
columns todecimal
columns with the specified scale and precisionDescribe alternatives you've considered
I've also found that:
throws the same error
The text was updated successfully, but these errors were encountered: