Skip to content

Commit

Permalink
Fix warnings in dataframe.py (#12369)
Browse files Browse the repository at this point in the history
Contributes to #9999 and #10363.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)
  - Ashwin Srinath (https://github.com/shwina)

URL: #12369
  • Loading branch information
vyasr authored Dec 19, 2022
1 parent 2046a75 commit 89c03af
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 87 deletions.
5 changes: 5 additions & 0 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5727,6 +5727,11 @@ def _prepare_for_rowwise_op(self, method, skipna):
common_dtype = find_common_type(filtered.dtypes)

if filtered._num_columns < self._num_columns:
# When we update our pandas compatibility target to 2.0, pandas
# will stop supporting numeric_only=None and users will have to
# specify True/False. At that time we should also top our implicit
# removal of non-numeric columns here.
assert Version(pd.__version__) < Version("2.0.0")
msg = (
"Row-wise operations currently only support int, float "
"and bool dtypes. Non numeric columns are ignored."
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/core/indexed_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _get_label_range_or_mask(index, start, stop, step):
if (
not (start is None and stop is None)
and type(index) is cudf.core.index.DatetimeIndex
and index.is_monotonic is False
and index.is_monotonic_increasing is False
):
start = pd.to_datetime(start)
stop = pd.to_datetime(stop)
Expand Down
Loading

0 comments on commit 89c03af

Please sign in to comment.