We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe.
In [1]: import cudf In [3]: round(cudf.DataFrame({"col1": [1.123, 2.123, 3.123], "col2": [1.234, 2.234, 3.234]})) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[3], line 1 ----> 1 round(cudf.DataFrame({"col1": [1.123, 2.123, 3.123], "col2": [1.234, 2.234, 3.234]})) TypeError: type DataFrame doesn't define __round__ method In [4]: import pandas as pd In [5]: round(pd.DataFrame({"col1": [1.123, 2.123, 3.123], "col2": [1.234, 2.234, 3.234]})) Out[5]: col1 col2 0 1.0 1.0 1 2.0 2.0 2 3.0 3.0
Describe the solution you'd like I suppose __round__ could dispatch to DataFrame.round
__round__
DataFrame.round
Describe alternatives you've considered Just call DataFrame.round
Additional context Add any other context, code examples, or references to existing implementations about the feature request here.
The text was updated successfully, but these errors were encountered:
Series
DataFrame
Related: #10177
Sorry, something went wrong.
Add support for __round__ in Series and DataFrame (#14099)
99c7711
Fixes: #14083 This PR fixes builtin function `round` call on `DataFrame` & `Series` to work by implementing `__round__` method. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Bradley Dice (https://github.com/bdice) URL: #14099
galipremsagar
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
I suppose
__round__
could dispatch toDataFrame.round
Describe alternatives you've considered
Just call
DataFrame.round
Additional context
Add any other context, code examples, or references to existing implementations about the feature request here.
The text was updated successfully, but these errors were encountered: