Skip to content

Commit 6e36aa7

Browse files
committed
Unify GH references in frame/test_apply.py
1 parent 1d3659c commit 6e36aa7

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

pandas/tests/frame/test_apply.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_apply(self, float_frame):
5959
[[1, 2, 3], [4, 5, 6], [7, 8, 9]], index=['a', 'a', 'c'])
6060
pytest.raises(ValueError, df.apply, lambda x: x, 2)
6161

62-
# see gh-9573
62+
# GH 9573
6363
df = DataFrame({'c0': ['A', 'A', 'B', 'B'],
6464
'c1': ['C', 'C', 'D', 'D']})
6565
df = df.apply(lambda ts: ts.astype('category'))
@@ -94,7 +94,7 @@ def test_apply_empty(self, float_frame, empty_frame):
9494
expected = Series(np.nan, index=float_frame.index)
9595
tm.assert_series_equal(result, expected)
9696

97-
# 2476
97+
# GH 2476
9898
expected = DataFrame(index=['a'])
9999
result = expected.apply(lambda x: x['a'], axis=1)
100100
tm.assert_frame_equal(expected, result)
@@ -467,11 +467,11 @@ def test_applymap(self, float_frame):
467467
tm.assert_frame_equal(applied, float_frame * 2)
468468
float_frame.applymap(type)
469469

470-
# gh-465: function returning tuples
470+
# GH 465: function returning tuples
471471
result = float_frame.applymap(lambda x: (x, x))
472472
assert isinstance(result['A'][0], tuple)
473473

474-
# gh-2909: object conversion to float in constructor?
474+
# GH 2909: object conversion to float in constructor?
475475
df = DataFrame(data=[1, 'a'])
476476
result = df.applymap(lambda x: x)
477477
assert result.dtypes[0] == object
@@ -480,7 +480,7 @@ def test_applymap(self, float_frame):
480480
result = df.applymap(lambda x: x)
481481
assert result.dtypes[0] == object
482482

483-
# see gh-2786
483+
# GH 2786
484484
df = DataFrame(np.random.random((3, 4)))
485485
df2 = df.copy()
486486
cols = ['a', 'a', 'a', 'a']
@@ -498,7 +498,7 @@ def test_applymap(self, float_frame):
498498
for f in ['datetime', 'timedelta']:
499499
assert result.loc[0, f] == str(df.loc[0, f])
500500

501-
# see gh-8222
501+
# GH 8222
502502
empty_frames = [DataFrame(),
503503
DataFrame(columns=list('ABC')),
504504
DataFrame(index=list('ABC')),
@@ -509,7 +509,7 @@ def test_applymap(self, float_frame):
509509
tm.assert_frame_equal(result, frame)
510510

511511
def test_applymap_box_timestamps(self):
512-
# #2689, #2627
512+
# GH 2689, GH 2627
513513
ser = Series(date_range('1/1/2000', periods=10))
514514

515515
def func(x):
@@ -546,7 +546,7 @@ def test_frame_apply_dont_convert_datetime64(self):
546546
assert df.x1.dtype == 'M8[ns]'
547547

548548
def test_apply_non_numpy_dtype(self):
549-
# See gh-12244
549+
# GH 12244
550550
df = DataFrame({'dt': date_range(
551551
"2015-01-01", periods=3, tz='Europe/Brussels')})
552552
result = df.apply(lambda x: x)
@@ -576,7 +576,7 @@ class TestInferOutputShape(object):
576576
# us to infer the output
577577

578578
def test_infer_row_shape(self):
579-
# gh-17437
579+
# GH 17437
580580
# if row shape is changing, infer it
581581
df = DataFrame(np.random.rand(10, 2))
582582
result = df.apply(np.fft.fft, axis=0)
@@ -586,7 +586,7 @@ def test_infer_row_shape(self):
586586
assert result.shape == (6, 2)
587587

588588
def test_with_dictlike_columns(self):
589-
# gh 17602
589+
# GH 17602
590590
df = DataFrame([[1, 2], [1, 2]], columns=['a', 'b'])
591591
result = df.apply(lambda x: {'s': x['a'] + x['b']},
592592
axis=1)
@@ -604,7 +604,7 @@ def test_with_dictlike_columns(self):
604604
expected = Series([{'s': 3}, {'s': 3}])
605605
tm.assert_series_equal(result, expected)
606606

607-
# gh-18775
607+
# GH 18775
608608
df = DataFrame()
609609
df["author"] = ["X", "Y", "Z"]
610610
df["publisher"] = ["BBC", "NBC", "N24"]
@@ -616,7 +616,7 @@ def test_with_dictlike_columns(self):
616616
tm.assert_series_equal(result, expected)
617617

618618
def test_with_dictlike_columns_with_infer(self):
619-
# gh 17602
619+
# GH 17602
620620
df = DataFrame([[1, 2], [1, 2]], columns=['a', 'b'])
621621
result = df.apply(lambda x: {'s': x['a'] + x['b']},
622622
axis=1, result_type='expand')
@@ -630,7 +630,7 @@ def test_with_dictlike_columns_with_infer(self):
630630
tm.assert_frame_equal(result, expected)
631631

632632
def test_with_listlike_columns(self):
633-
# gh-17348
633+
# GH 17348
634634
df = DataFrame({'a': Series(np.random.randn(4)),
635635
'b': ['a', 'list', 'of', 'words'],
636636
'ts': date_range('2016-10-01', periods=4, freq='H')})
@@ -643,7 +643,7 @@ def test_with_listlike_columns(self):
643643
expected = Series([t[1:] for t in df[['a', 'ts']].itertuples()])
644644
tm.assert_series_equal(result, expected)
645645

646-
# gh-18919
646+
# GH 18919
647647
df = DataFrame({'x': Series([['a', 'b'], ['q']]),
648648
'y': Series([['z'], ['q', 't']])})
649649
df.index = MultiIndex.from_tuples([('i0', 'j0'), ('i1', 'j1')])
@@ -655,7 +655,7 @@ def test_with_listlike_columns(self):
655655
tm.assert_series_equal(result, expected)
656656

657657
def test_infer_output_shape_columns(self):
658-
# gh-18573
658+
# GH 18573
659659

660660
df = DataFrame({'number': [1., 2.],
661661
'string': ['foo', 'bar'],
@@ -666,7 +666,7 @@ def test_infer_output_shape_columns(self):
666666
tm.assert_series_equal(result, expected)
667667

668668
def test_infer_output_shape_listlike_columns(self):
669-
# gh-16353
669+
# GH 16353
670670

671671
df = DataFrame(np.random.randn(6, 3), columns=['A', 'B', 'C'])
672672

@@ -678,7 +678,7 @@ def test_infer_output_shape_listlike_columns(self):
678678
expected = Series([[1, 2] for t in df.itertuples()])
679679
tm.assert_series_equal(result, expected)
680680

681-
# gh-17970
681+
# GH 17970
682682
df = DataFrame({"a": [1, 2, 3]}, index=list('abc'))
683683

684684
result = df.apply(lambda row: np.ones(1), axis=1)
@@ -691,7 +691,7 @@ def test_infer_output_shape_listlike_columns(self):
691691
index=df.index)
692692
tm.assert_series_equal(result, expected)
693693

694-
# gh-17892
694+
# GH 17892
695695
df = DataFrame({'a': [Timestamp('2010-02-01'),
696696
Timestamp('2010-02-04'),
697697
Timestamp('2010-02-05'),
@@ -899,7 +899,7 @@ def f():
899899
'abs', 'shift', 'pct_change', 'cumsum', 'rank',
900900
])
901901
def test_transform_method_name(self, method):
902-
# https://github.com/pandas-dev/pandas/issues/19760
902+
# GH 19760
903903
df = DataFrame({"A": [-1, 2]})
904904
result = df.transform(method)
905905
expected = operator.methodcaller(method)(df)
@@ -923,7 +923,7 @@ def test_demo(self):
923923
tm.assert_frame_equal(result.reindex_like(expected), expected)
924924

925925
def test_agg_multiple_mixed_no_warning(self):
926-
# https://github.com/pandas-dev/pandas/issues/20909
926+
# GH 20909
927927
mdf = DataFrame({'A': [1, 2, 3],
928928
'B': [1., 2., 3.],
929929
'C': ['foo', 'bar', 'baz'],
@@ -1106,7 +1106,7 @@ def test_non_callable_aggregates(self):
11061106
]),
11071107
))
11081108
def test_agg_cython_table(self, df, func, expected, axis):
1109-
# GH21224
1109+
# GH 21224
11101110
# test reducing functions in
11111111
# pandas.core.base.SelectionMixin._cython_table
11121112
result = df.agg(func, axis=axis)
@@ -1125,7 +1125,7 @@ def test_agg_cython_table(self, df, func, expected, axis):
11251125
]),
11261126
))
11271127
def test_agg_cython_table_transform(self, df, func, expected, axis):
1128-
# GH21224
1128+
# GH 21224
11291129
# test transforming functions in
11301130
# pandas.core.base.SelectionMixin._cython_table (cumprod, cumsum)
11311131
result = df.agg(func, axis=axis)
@@ -1137,7 +1137,7 @@ def test_agg_cython_table_transform(self, df, func, expected, axis):
11371137
]),
11381138
)
11391139
def test_agg_cython_table_raises(self, df, func, expected, axis):
1140-
# GH21224
1140+
# GH 21224
11411141
with pytest.raises(expected):
11421142
df.agg(func, axis=axis)
11431143

@@ -1156,7 +1156,7 @@ def indices(draw, max_length=5):
11561156

11571157
@given(index=indices(5), num_columns=integers(0, 5))
11581158
def test_frequency_is_original(self, index, num_columns):
1159-
# GH22150
1159+
# GH 22150
11601160
original = index.copy()
11611161
df = DataFrame(True, index=index, columns=range(num_columns))
11621162
df.apply(lambda x: x)

0 commit comments

Comments
 (0)