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
numeric_only
Series
Describe the bug numeric_only can be ignored as a no-op in certain Series operations based on dtype.
Steps/Code to reproduce bug
In [1]: import pandas as pd In [2]: s = pd.Series([1, 2, 3]) In [4]: s = pd.Series([1, 2, 3, 10]) In [5]: s.skew() Out[5]: 1.763632614803888 In [6]: s.skew(numeric_only=True) Out[6]: 1.763632614803888 In [7]: s.skew(numeric_only=False) Out[7]: 1.763632614803888 In [8]: import cudf s = In [9]: s = cudf.from_pandas(s) s. In [10]: s.skew() Out[10]: 1.763632614803888 In [11]: s.skew(numeric_only=False) Out[11]: 1.763632614803888 In [12]: s.skew(numeric_only=True) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[12], line 1 ----> 1 s.skew(numeric_only=True) File /nvme/0/pgali/envs/cudfdev/lib/python3.10/site-packages/nvtx/nvtx.py:101, in annotate.__call__.<locals>.inner(*args, **kwargs) 98 @wraps(func) 99 def inner(*args, **kwargs): 100 libnvtx_push_range(self.attributes, self.domain.handle) --> 101 result = func(*args, **kwargs) 102 libnvtx_pop_range(self.domain.handle) 103 return result File /nvme/0/pgali/envs/cudfdev/lib/python3.10/site-packages/cudf/core/frame.py:2401, in Frame.skew(self, axis, skipna, level, numeric_only, **kwargs) 2398 if axis not in (0, "index", None, no_default): 2399 raise NotImplementedError("Only axis=0 is currently supported.") -> 2401 return self._reduce( 2402 "skew", 2403 axis=axis, 2404 skipna=skipna, 2405 level=level, 2406 numeric_only=numeric_only, 2407 **kwargs, 2408 ) File /nvme/0/pgali/envs/cudfdev/lib/python3.10/site-packages/nvtx/nvtx.py:101, in annotate.__call__.<locals>.inner(*args, **kwargs) 98 @wraps(func) 99 def inner(*args, **kwargs): 100 libnvtx_push_range(self.attributes, self.domain.handle) --> 101 result = func(*args, **kwargs) 102 libnvtx_pop_range(self.domain.handle) 103 return result File /nvme/0/pgali/envs/cudfdev/lib/python3.10/site-packages/cudf/core/single_column_frame.py:53, in SingleColumnFrame._reduce(self, op, axis, level, numeric_only, **kwargs) 50 raise NotImplementedError("level parameter is not implemented yet") 52 if numeric_only: ---> 53 raise NotImplementedError( 54 f"Series.{op} does not implement numeric_only" 55 ) 56 try: 57 return getattr(self._column, op)(**kwargs) NotImplementedError: Series.skew does not implement numeric_only
Expected behavior
In [7]: s.skew(numeric_only=False) Out[7]: 1.763632614803888
Environment overview (please complete the following information)
The text was updated successfully, but these errors were encountered:
numeric_only=True
Allow numeric_only=True for reduction operations on numeric types (#…
89557bb
…14111) Fixes: #14090 This PR allows passing `numeric_only=True` for reduction operation on numerical columns. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: #14111
galipremsagar
Successfully merging a pull request may close this issue.
Describe the bug
numeric_only
can be ignored as a no-op in certainSeries
operations based on dtype.Steps/Code to reproduce bug
Expected behavior
Environment overview (please complete the following information)
The text was updated successfully, but these errors were encountered: