Skip to content

Commit 9f48b59

Browse files
jbrockmendelKevin D Smith
authored and
Kevin D Smith
committed
TST/REF: misplaced frame.indexing tests (pandas-dev#37319)
1 parent 35ad2bb commit 9f48b59

File tree

11 files changed

+408
-412
lines changed

11 files changed

+408
-412
lines changed

pandas/tests/frame/indexing/test_categorical.py

-19
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,6 @@ def test_assigning_ops(self):
352352
df.loc[2:3, "b"] = Categorical(["b", "b"], categories=["a", "b"])
353353
tm.assert_frame_equal(df, exp)
354354

355-
def test_functions_no_warnings(self):
356-
df = DataFrame({"value": np.random.randint(0, 100, 20)})
357-
labels = [f"{i} - {i + 9}" for i in range(0, 100, 10)]
358-
with tm.assert_produces_warning(False):
359-
df["group"] = pd.cut(
360-
df.value, range(0, 105, 10), right=False, labels=labels
361-
)
362-
363355
def test_setitem_single_row_categorical(self):
364356
# GH 25495
365357
df = DataFrame({"Alpha": ["a"], "Numeric": [0]})
@@ -394,14 +386,3 @@ def test_loc_indexing_preserves_index_category_dtype(self):
394386

395387
result = df.loc[["a"]].index.levels[0]
396388
tm.assert_index_equal(result, expected)
397-
398-
def test_categorical_filtering(self):
399-
# GH22609 Verify filtering operations on DataFrames with categorical Series
400-
df = DataFrame(data=[[0, 0], [1, 1]], columns=["a", "b"])
401-
df["b"] = df.b.astype("category")
402-
403-
result = df.where(df.a > 0)
404-
expected = df.copy()
405-
expected.loc[0, :] = np.nan
406-
407-
tm.assert_equal(result, expected)

pandas/tests/frame/indexing/test_datetime.py

-48
This file was deleted.

0 commit comments

Comments
 (0)