diff --git a/CHANGELOG.md b/CHANGELOG.md index 53101ae1853..de705dcb915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - PR #6118 Fix Java build for ORC read args change and update package version - PR #6121 Replace calls to get_default_resource with get_current_device_resource - PR #6128 Add support for numpy RandomState handling in `sample` +- PR #6154 Warnings on row-wise op only when non-numeric columns are found. - PR #6150 Fix issue related to inferring `datetime64` format with UTC timezone in string data @@ -205,12 +206,12 @@ - PR #5602 Add support for concatenation of `Series` & `DataFrame` in `cudf.concat` when `axis=0` - PR #5603 Refactor JIT `parser.cpp` - PR #5643 Update `isort` to 5.0.4 -- PR #5648 OO interface for hash join with explicit `build/probe` semantic +- PR #5648 OO interface for hash join with explicit `build/probe` semantic - PR #5662 Make Java ColumnVector(long nativePointer) constructor public - PR #5681 Pin black, flake8 and isort - PR #5679 Use `pickle5` to test older Python versions - PR #5684 Use `pickle5` in `Serializable` (when available) -- PR #5419 Support rolling, groupby_rolling for durations +- PR #5419 Support rolling, groupby_rolling for durations - PR #5687 Change strings::split_record to return a lists column - PR #5708 Add support for `dummy_na` in `get_dummies` - PR #5709 Update java build to help cu-spacial with java bindings diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index 685f04cb14b..eca8b85c03d 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -5344,10 +5344,6 @@ def isin(self, values): def _prepare_for_rowwise_op(self): """Prepare a DataFrame for CuPy-based row-wise operations. """ - warnings.warn( - "Row-wise operations currently only support int, float, " - "and bool dtypes." - ) if any([col.nullable for col in self._columns]): msg = ( @@ -5359,6 +5355,12 @@ def _prepare_for_rowwise_op(self): filtered = self.select_dtypes(include=[np.number, np.bool]) common_dtype = np.find_common_type(filtered.dtypes, []) + if filtered._num_columns < self._num_columns: + msg = ( + "Row-wise operations currently only support int, float " + "and bool dtypes. Non numeric columns are ignored." + ) + warnings.warn(msg) coerced = filtered.astype(common_dtype) return coerced