Skip to content

Commit 780dd84

Browse files
committed
Clean res/exp for frame/test_analytics.py
1 parent f29a839 commit 780dd84

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pandas/tests/frame/test_analytics.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ def test_describe_categorical(self):
479479

480480
cat = Series(Categorical(["a", "b", "c", "c"]))
481481
df3 = DataFrame({"cat": cat, "s": ["a", "b", "c", "c"]})
482-
res = df3.describe()
483-
tm.assert_numpy_array_equal(res["cat"].values, res["s"].values)
482+
result = df3.describe()
483+
tm.assert_numpy_array_equal(result["cat"].values, result["s"].values)
484484

485485
def test_describe_categorical_columns(self):
486486
# GH 11558
@@ -551,8 +551,8 @@ def test_describe_timedelta_values(self):
551551
index=['count', 'mean', 'std', 'min', '25%',
552552
'50%', '75%', 'max'])
553553

554-
res = df.describe()
555-
tm.assert_frame_equal(res, expected)
554+
result = df.describe()
555+
tm.assert_frame_equal(result, expected)
556556

557557
exp_repr = (" t1 t2\n"
558558
"count 5 5\n"
@@ -563,7 +563,7 @@ def test_describe_timedelta_values(self):
563563
"50% 3 days 00:00:00 0 days 03:00:00\n"
564564
"75% 4 days 00:00:00 0 days 04:00:00\n"
565565
"max 5 days 00:00:00 0 days 05:00:00")
566-
assert repr(res) == exp_repr
566+
assert repr(result) == exp_repr
567567

568568
def test_describe_tz_values(self, tz_naive_fixture):
569569
# GH 21332
@@ -584,8 +584,8 @@ def test_describe_tz_values(self, tz_naive_fixture):
584584
'last', 'mean', 'std', 'min', '25%', '50%',
585585
'75%', 'max']
586586
)
587-
res = df.describe(include='all')
588-
tm.assert_frame_equal(res, expected)
587+
result = df.describe(include='all')
588+
tm.assert_frame_equal(result, expected)
589589

590590
def test_reduce_mixed_frame(self):
591591
# GH 6806
@@ -1202,7 +1202,6 @@ def test_stats_mixed_type(self, float_string_frame):
12021202
float_string_frame.mean(1)
12031203
float_string_frame.skew(1)
12041204

1205-
12061205
# TODO: Ensure warning isn't emitted in the first place
12071206
@pytest.mark.filterwarnings("ignore:All-NaN:RuntimeWarning")
12081207
def test_median_corner(self, int_frame, float_frame, float_string_frame):

0 commit comments

Comments
 (0)