Skip to content

TST/REF: misplaced frame.indexing tests #37319

New issue

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

Merged
merged 7 commits into from
Oct 22, 2020
Merged
19 changes: 0 additions & 19 deletions pandas/tests/frame/indexing/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,6 @@ def test_assigning_ops(self):
df.loc[2:3, "b"] = Categorical(["b", "b"], categories=["a", "b"])
tm.assert_frame_equal(df, exp)

def test_functions_no_warnings(self):
df = DataFrame({"value": np.random.randint(0, 100, 20)})
labels = [f"{i} - {i + 9}" for i in range(0, 100, 10)]
with tm.assert_produces_warning(False):
df["group"] = pd.cut(
df.value, range(0, 105, 10), right=False, labels=labels
)

def test_setitem_single_row_categorical(self):
# GH 25495
df = DataFrame({"Alpha": ["a"], "Numeric": [0]})
Expand Down Expand Up @@ -394,14 +386,3 @@ def test_loc_indexing_preserves_index_category_dtype(self):

result = df.loc[["a"]].index.levels[0]
tm.assert_index_equal(result, expected)

def test_categorical_filtering(self):
# GH22609 Verify filtering operations on DataFrames with categorical Series
df = DataFrame(data=[[0, 0], [1, 1]], columns=["a", "b"])
df["b"] = df.b.astype("category")

result = df.where(df.a > 0)
expected = df.copy()
expected.loc[0, :] = np.nan

tm.assert_equal(result, expected)
48 changes: 0 additions & 48 deletions pandas/tests/frame/indexing/test_datetime.py

This file was deleted.

Loading