Skip to content

Commit a399489

Browse files
committed
Unify GH references in frame/test_apply.py
1 parent be4605d commit a399489

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

pandas/tests/frame/test_apply.py

+24-24
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
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
assert_frame_equal(expected, result)
@@ -468,11 +468,11 @@ def test_applymap(self, float_frame):
468468
tm.assert_frame_equal(applied, float_frame * 2)
469469
float_frame.applymap(type)
470470

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

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

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

502-
# see gh-8222
502+
# GH 8222
503503
empty_frames = [pd.DataFrame(),
504504
pd.DataFrame(columns=list('ABC')),
505505
pd.DataFrame(index=list('ABC')),
@@ -510,7 +510,7 @@ def test_applymap(self, float_frame):
510510
tm.assert_frame_equal(result, frame)
511511

512512
def test_applymap_box_timestamps(self):
513-
# #2689, #2627
513+
# GH 2689, GH 2627
514514
ser = pd.Series(date_range('1/1/2000', periods=10))
515515

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

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

579579
def test_infer_row_shape(self):
580-
# gh-17437
580+
# GH 17437
581581
# if row shape is changing, infer it
582582
df = pd.DataFrame(np.random.rand(10, 2))
583583
result = df.apply(np.fft.fft, axis=0)
@@ -587,7 +587,7 @@ def test_infer_row_shape(self):
587587
assert result.shape == (6, 2)
588588

589589
def test_with_dictlike_columns(self):
590-
# gh 17602
590+
# GH 17602
591591
df = DataFrame([[1, 2], [1, 2]], columns=['a', 'b'])
592592
result = df.apply(lambda x: {'s': x['a'] + x['b']},
593593
axis=1)
@@ -605,7 +605,7 @@ def test_with_dictlike_columns(self):
605605
expected = Series([{'s': 3}, {'s': 3}])
606606
assert_series_equal(result, expected)
607607

608-
# gh-18775
608+
# GH 18775
609609
df = DataFrame()
610610
df["author"] = ["X", "Y", "Z"]
611611
df["publisher"] = ["BBC", "NBC", "N24"]
@@ -617,7 +617,7 @@ def test_with_dictlike_columns(self):
617617
assert_series_equal(result, expected)
618618

619619
def test_with_dictlike_columns_with_infer(self):
620-
# gh 17602
620+
# GH 17602
621621
df = DataFrame([[1, 2], [1, 2]], columns=['a', 'b'])
622622
result = df.apply(lambda x: {'s': x['a'] + x['b']},
623623
axis=1, result_type='expand')
@@ -631,7 +631,7 @@ def test_with_dictlike_columns_with_infer(self):
631631
assert_frame_equal(result, expected)
632632

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

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

658658
def test_infer_output_shape_columns(self):
659-
# gh-18573
659+
# GH 18573
660660

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

669669
def test_infer_output_shape_listlike_columns(self):
670-
# gh-16353
670+
# GH 16353
671671

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

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

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

685685
result = df.apply(lambda row: np.ones(1), axis=1)
@@ -692,7 +692,7 @@ def test_infer_output_shape_listlike_columns(self):
692692
index=df.index)
693693
assert_series_equal(result, expected)
694694

695-
# gh-17892
695+
# GH 17892
696696
df = pd.DataFrame({'a': [pd.Timestamp('2010-02-01'),
697697
pd.Timestamp('2010-02-04'),
698698
pd.Timestamp('2010-02-05'),
@@ -900,7 +900,7 @@ def f():
900900
'abs', 'shift', 'pct_change', 'cumsum', 'rank',
901901
])
902902
def test_transform_method_name(self, method):
903-
# https://github.com/pandas-dev/pandas/issues/19760
903+
# GH 19760
904904
df = pd.DataFrame({"A": [-1, 2]})
905905
result = df.transform(method)
906906
expected = operator.methodcaller(method)(df)
@@ -924,7 +924,7 @@ def test_demo(self):
924924
tm.assert_frame_equal(result.reindex_like(expected), expected)
925925

926926
def test_agg_multiple_mixed_no_warning(self):
927-
# https://github.com/pandas-dev/pandas/issues/20909
927+
# GH 20909
928928
mdf = pd.DataFrame({'A': [1, 2, 3],
929929
'B': [1., 2., 3.],
930930
'C': ['foo', 'bar', 'baz'],
@@ -1107,7 +1107,7 @@ def test_non_callable_aggregates(self):
11071107
]),
11081108
))
11091109
def test_agg_cython_table(self, df, func, expected, axis):
1110-
# GH21224
1110+
# GH 21224
11111111
# test reducing functions in
11121112
# pandas.core.base.SelectionMixin._cython_table
11131113
result = df.agg(func, axis=axis)
@@ -1126,7 +1126,7 @@ def test_agg_cython_table(self, df, func, expected, axis):
11261126
]),
11271127
))
11281128
def test_agg_cython_table_transform(self, df, func, expected, axis):
1129-
# GH21224
1129+
# GH 21224
11301130
# test transforming functions in
11311131
# pandas.core.base.SelectionMixin._cython_table (cumprod, cumsum)
11321132
result = df.agg(func, axis=axis)
@@ -1138,7 +1138,7 @@ def test_agg_cython_table_transform(self, df, func, expected, axis):
11381138
]),
11391139
)
11401140
def test_agg_cython_table_raises(self, df, func, expected, axis):
1141-
# GH21224
1141+
# GH 21224
11421142
with pytest.raises(expected):
11431143
df.agg(func, axis=axis)
11441144

@@ -1157,7 +1157,7 @@ def indices(draw, max_length=5):
11571157

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

0 commit comments

Comments
 (0)