Skip to content

Commit

Permalink
add more ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Dec 13, 2024
1 parent 9a17d31 commit ae60bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pandas/tests/groupby/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def f(a):
}


@pytest.mark.filterwarnings("ignore:invalid value encountered in cast:RuntimeWarning")
def test_apply_use_categorical_name(df):
cats = qcut(df.C, 4)

Expand Down Expand Up @@ -338,6 +339,7 @@ def test_apply(ordered):
tm.assert_series_equal(result, expected)


@pytest.mark.filterwarnings("ignore:invalid value encountered in cast:RuntimeWarning")
def test_observed(request, using_infer_string, observed):
# multiple groupers, don't re-expand the output space
# of the grouper
Expand Down Expand Up @@ -1556,6 +1558,7 @@ def test_dataframe_groupby_on_2_categoricals_when_observed_is_false(
assert (res.loc[unobserved_cats] == expected).all().all()


@pytest.mark.filterwarnings("ignore:invalid value encountered in cast:RuntimeWarning")
def test_series_groupby_categorical_aggregation_getitem():
# GH 8870
d = {"foo": [10, 8, 4, 1], "bar": [10, 20, 30, 40], "baz": ["d", "c", "d", "c"]}
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/groupby/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -3118,6 +3118,7 @@ def test_groupby_numeric_only_std_no_result(numeric_only):
dfgb.std(numeric_only=numeric_only)


@pytest.mark.filterwarnings("ignore:invalid value encountered in cast:RuntimeWarning")
def test_grouping_with_categorical_interval_columns():
# GH#34164
df = DataFrame({"x": [0.1, 0.2, 0.3, -0.4, 0.5], "w": ["a", "b", "a", "c", "a"]})
Expand Down

0 comments on commit ae60bf7

Please sign in to comment.