Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -4225,7 +4225,7 @@ def dropna(
name toy born
0 Alfred Batmobile 1940-04-25
"""
if axis == 0:
if axis in [0, "index"]:
result = self._drop_na_rows(how=how, subset=subset, thresh=thresh)
if ignore_index:
result.index = RangeIndex(len(result))
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/pandas/scripts/conftest-patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5157,6 +5157,7 @@ def pytest_unconfigure(config):
"tests/frame/methods/test_dropna.py::TestDataFrameMissingData::test_dropna",
"tests/frame/methods/test_dropna.py::TestDataFrameMissingData::test_dropna_multiple_axes",
"tests/frame/methods/test_dropna.py::TestDataFrameMissingData::test_no_nans_in_frame[axis=0]",
"tests/frame/methods/test_dropna.py::TestDataFrameMissingData::test_no_nans_in_frame[axis='index']",
"tests/frame/methods/test_dtypes.py::TestDataFrameDataTypes::test_dtypes_timedeltas",
"tests/frame/methods/test_equals.py::TestEquals::test_equals_different_blocks",
"tests/frame/methods/test_explode.py::test_duplicate_index[input_dict0-input_index0-expected_dict0-expected_index0]",
Expand Down Expand Up @@ -13144,7 +13145,6 @@ def pytest_unconfigure(config):
"tests/series/methods/test_update.py::TestUpdate::test_update_dtypes[other9-int64-expected9-FutureWarning]",
"tests/series/methods/test_value_counts.py::TestSeriesValueCounts::test_value_counts_categorical_with_nan",
"tests/series/test_api.py::TestSeriesMisc::test_attrs",
"tests/series/test_api.py::TestSeriesMisc::test_axis_alias",
"tests/series/test_api.py::TestSeriesMisc::test_index_tab_completion[index0]",
"tests/series/test_api.py::TestSeriesMisc::test_index_tab_completion[index10]",
"tests/series/test_api.py::TestSeriesMisc::test_index_tab_completion[index11]",
Expand Down
7 changes: 0 additions & 7 deletions python/cudf/cudf/testing/_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2020-2025, NVIDIA CORPORATION.
from __future__ import annotations

import itertools
import string
from collections import abc
from contextlib import contextmanager
Expand Down Expand Up @@ -358,12 +357,6 @@ def assert_asserters_equal(
cudf_asserter(cudf_left, cudf_right, *args, **kwargs)


parametrize_numeric_dtypes_pairwise = pytest.mark.parametrize(
"left_dtype,right_dtype",
list(itertools.combinations_with_replacement(NUMERIC_TYPES, 2)),
)


@contextmanager
def expect_warning_if(condition, warning=FutureWarning, *args, **kwargs):
"""Catch a warning using pytest.warns if the expect_warning is True.
Expand Down
55 changes: 55 additions & 0 deletions python/cudf/cudf/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2019-2025, NVIDIA CORPORATION.

import itertools
import math
import operator
import os
import pathlib
Expand Down Expand Up @@ -210,6 +211,44 @@ def set_decomp_env_vars(monkeypatch, request):
operator.gt,
operator.ge,
]
bitwise_ops = [
operator.and_,
operator.or_,
operator.xor,
]
unary_ops = [
math.acos,
math.acosh,
math.asin,
math.asinh,
math.atan,
math.atanh,
math.ceil,
math.cos,
math.degrees,
math.erf,
math.erfc,
math.exp,
math.expm1,
math.fabs,
math.floor,
math.gamma,
math.lgamma,
math.log,
math.log10,
math.log1p,
math.log2,
math.radians,
math.sin,
math.sinh,
math.sqrt,
math.tan,
math.tanh,
operator.pos,
operator.neg,
operator.not_,
operator.invert,
]


@pytest.fixture(params=arithmetic_ops)
Expand Down Expand Up @@ -238,6 +277,16 @@ def comparison_op_method(comparison_op):
return comparison_op.__name__


@pytest.fixture(params=bitwise_ops)
def bitwise_op(request):
return request.param


@pytest.fixture(params=unary_ops)
def unary_op(request):
return request.param


@pytest.fixture(params=arithmetic_ops + comparison_ops)
def binary_op(request):
return request.param
Expand Down Expand Up @@ -576,3 +625,9 @@ def categorical_ordered(request):
def interval_closed(request):
"""Param for `closed` argument for interval types"""
return request.param


@pytest.fixture(params=["all", "any"])
def dropna_how(request):
"""Param for `how` argument"""
return request.param
Loading