Skip to content

Commit 733b889

Browse files
committed
Revert "Change GH reference formatting (review jreback)"
This reverts commit 855a186.
1 parent 855a186 commit 733b889

File tree

4 files changed

+88
-88
lines changed

4 files changed

+88
-88
lines changed

pandas/tests/frame/test_analytics.py

+41-41
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def test_corr_int_and_boolean(self):
262262
tm.assert_frame_equal(result, expected)
263263

264264
def test_corr_cov_independent_index_column(self):
265-
# gh-14617
265+
# GH 14617
266266
df = pd.DataFrame(np.random.randn(4 * 10).reshape(10, 4),
267267
columns=list("abcd"))
268268
for method in ['cov', 'corr']:
@@ -271,7 +271,7 @@ def test_corr_cov_independent_index_column(self):
271271
assert result.index.equals(result.columns)
272272

273273
def test_corr_invalid_method(self):
274-
# gh-22298
274+
# GH 22298
275275
df = pd. DataFrame(np.random.normal(size=(10, 2)))
276276
msg = ("method must be either 'pearson', 'spearman', "
277277
"or 'kendall'")
@@ -387,7 +387,7 @@ def test_corrwith_matches_corrcoef(self):
387387
assert c1 < 1
388388

389389
def test_corrwith_mixed_dtypes(self):
390-
# gh-18570
390+
# GH 18570
391391
df = pd.DataFrame({'a': [1, 4, 3, 2], 'b': [4, 6, 7, 3],
392392
'c': ['a', 'b', 'c', 'd']})
393393
s = pd.Series([0, 6, 7, 3])
@@ -420,7 +420,7 @@ def test_bool_describe_in_mixed_frame(self):
420420
tm.assert_frame_equal(result, expected)
421421

422422
def test_describe_bool_frame(self):
423-
# gh-13891
423+
# GH 13891
424424
df = pd.DataFrame({
425425
'bool_data_1': [False, False, True, True],
426426
'bool_data_2': [False, True, True, True]
@@ -483,7 +483,7 @@ def test_describe_categorical(self):
483483
tm.assert_numpy_array_equal(result["cat"].values, result["s"].values)
484484

485485
def test_describe_categorical_columns(self):
486-
# gh-11558
486+
# GH 11558
487487
columns = pd.CategoricalIndex(['int1', 'int2', 'obj'],
488488
ordered=True, name='XXX')
489489
df = DataFrame({'int1': [10, 20, 30, 40, 50],
@@ -529,7 +529,7 @@ def test_describe_datetime_columns(self):
529529
assert result.columns.tz == expected.columns.tz
530530

531531
def test_describe_timedelta_values(self):
532-
# gh-6145
532+
# GH 6145
533533
t1 = pd.timedelta_range('1 days', freq='D', periods=5)
534534
t2 = pd.timedelta_range('1 hours', freq='H', periods=5)
535535
df = pd.DataFrame({'t1': t1, 't2': t2})
@@ -566,7 +566,7 @@ def test_describe_timedelta_values(self):
566566
assert repr(result) == exp_repr
567567

568568
def test_describe_tz_values(self, tz_naive_fixture):
569-
# gh-21332
569+
# GH 21332
570570
tz = tz_naive_fixture
571571
s1 = Series(range(5))
572572
start = Timestamp(2018, 1, 1)
@@ -588,7 +588,7 @@ def test_describe_tz_values(self, tz_naive_fixture):
588588
tm.assert_frame_equal(result, expected)
589589

590590
def test_reduce_mixed_frame(self):
591-
# gh-6806
591+
# GH 6806
592592
df = DataFrame({
593593
'bool_data': [True, True, False, False, False],
594594
'int_data': [10, 20, 30, 40, 50],
@@ -615,7 +615,7 @@ def test_count(self, float_frame_with_na, float_frame, float_string_frame):
615615
ct2 = frame.count(0)
616616
assert isinstance(ct2, Series)
617617

618-
# gh-423
618+
# GH 423
619619
df = DataFrame(index=lrange(10))
620620
result = df.count(1)
621621
expected = Series(0, index=df.index)
@@ -662,7 +662,7 @@ def test_sum(self, float_frame_with_na, mixed_float_frame,
662662
@pytest.mark.parametrize('method', ['sum', 'mean', 'prod', 'var',
663663
'std', 'skew', 'min', 'max'])
664664
def test_stat_operators_attempt_obj_array(self, method):
665-
# gh-676
665+
# GH 676
666666
data = {
667667
'a': [-0.00049987540199591344, -0.0016467257772919831,
668668
0.00067695870775883013],
@@ -804,7 +804,7 @@ def test_var_std(self, float_frame_with_na, datetime_frame, float_frame,
804804
@pytest.mark.parametrize(
805805
"meth", ['sem', 'var', 'std'])
806806
def test_numeric_only_flag(self, meth):
807-
# gh-9201
807+
# GH 9201
808808
df1 = DataFrame(np.random.randn(5, 3), columns=['foo', 'bar', 'baz'])
809809
# set one entry to a number in str format
810810
df1.loc[0, 'foo'] = '100'
@@ -830,7 +830,7 @@ def test_numeric_only_flag(self, meth):
830830
@pytest.mark.parametrize('op', ['mean', 'std', 'var',
831831
'skew', 'kurt', 'sem'])
832832
def test_mixed_ops(self, op):
833-
# gh-16116
833+
# GH 16116
834834
df = DataFrame({'int': [1, 2, 3, 4],
835835
'float': [1., 2., 3., 4.],
836836
'str': ['a', 'b', 'c', 'd']})
@@ -1086,7 +1086,7 @@ def test_operators_timedelta64(self):
10861086
timedelta(days=-1)], index=['A', 'B'])
10871087
tm.assert_series_equal(result, expected)
10881088

1089-
# gh-3106
1089+
# GH 3106
10901090
df = DataFrame({'time': date_range('20130102', periods=5),
10911091
'time2': date_range('20130105', periods=5)})
10921092
df['off1'] = df['time2'] - df['time']
@@ -1369,12 +1369,12 @@ def test_any_all_extra(self):
13691369
(np.any, {'A': pd.Series([1, 2], dtype='category')}, True),
13701370
13711371
# # Mix
1372-
# gh-21484
1372+
# GH 21484
13731373
# (np.all, {'A': pd.Series([10, 20], dtype='M8[ns]'),
13741374
# 'B': pd.Series([10, 20], dtype='m8[ns]')}, True),
13751375
])
13761376
def test_any_all_np_func(self, func, data, expected):
1377-
# gh-19976
1377+
# GH 19976
13781378
data = DataFrame(data)
13791379
result = func(data)
13801380
assert isinstance(result, np.bool_)
@@ -1386,7 +1386,7 @@ def test_any_all_np_func(self, func, data, expected):
13861386
assert result.item() is expected
13871387

13881388
def test_any_all_object(self):
1389-
# gh-19976
1389+
# GH 19976
13901390
result = np.all(DataFrame(columns=['a', 'b'])).item()
13911391
assert result is True
13921392

@@ -1408,7 +1408,7 @@ def test_any_all_level_axis_none_raises(self, method):
14081408
# Isin
14091409

14101410
def test_isin(self):
1411-
# gh-4211
1411+
# GH 4211
14121412
df = DataFrame({'vals': [1, 2, 3, 4], 'ids': ['a', 'b', 'f', 'n'],
14131413
'ids2': ['a', 'n', 'c', 'n']},
14141414
index=['foo', 'bar', 'baz', 'qux'])
@@ -1420,7 +1420,7 @@ def test_isin(self):
14201420

14211421
@pytest.mark.parametrize("empty", [[], Series(), np.array([])])
14221422
def test_isin_empty(self, empty):
1423-
# gh-16991
1423+
# GH 16991
14241424
df = DataFrame({'A': ['a', 'b', 'c'], 'B': ['a', 'e', 'f']})
14251425
expected = DataFrame(False, df.index, df.columns)
14261426

@@ -1446,7 +1446,7 @@ def test_isin_dict(self):
14461446
tm.assert_frame_equal(result, expected)
14471447

14481448
def test_isin_with_string_scalar(self):
1449-
# gh-4763
1449+
# GH 4763
14501450
df = DataFrame({'vals': [1, 2, 3, 4], 'ids': ['a', 'b', 'f', 'n'],
14511451
'ids2': ['a', 'n', 'c', 'n']},
14521452
index=['foo', 'bar', 'baz', 'qux'])
@@ -1472,7 +1472,7 @@ def test_isin_df(self):
14721472
tm.assert_frame_equal(result, expected)
14731473

14741474
def test_isin_tuples(self):
1475-
# gh-16394
1475+
# GH 16394
14761476
df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']})
14771477
df['C'] = list(zip(df['A'], df['B']))
14781478
result = df['C'].isin([(1, 'a')])
@@ -1542,7 +1542,7 @@ def test_isin_multiIndex(self):
15421542
tm.assert_frame_equal(result, expected)
15431543

15441544
def test_isin_empty_datetimelike(self):
1545-
# gh-15473
1545+
# GH 15473
15461546
df1_ts = DataFrame({'date':
15471547
pd.to_datetime(['2014-01-01', '2014-01-02'])})
15481548
df1_td = DataFrame({'date':
@@ -1564,7 +1564,7 @@ def test_isin_empty_datetimelike(self):
15641564

15651565
# Rounding
15661566
def test_round(self):
1567-
# gh-2665
1567+
# GH 2665
15681568

15691569
# Test that rounding an empty DataFrame does nothing
15701570
df = DataFrame()
@@ -1667,7 +1667,7 @@ def test_round(self):
16671667
tm.assert_series_equal(df['col1'].round(1), expected_rounded['col1'])
16681668

16691669
# named columns
1670-
# gh-11986
1670+
# GH 11986
16711671
decimals = 2
16721672
expected_rounded = DataFrame(
16731673
{'col1': [1.12, 2.12, 3.12], 'col2': [1.23, 2.23, 3.23]})
@@ -1682,7 +1682,7 @@ def test_round(self):
16821682
expected_rounded['col1'])
16831683

16841684
def test_numpy_round(self):
1685-
# gh-12600
1685+
# GH 12600
16861686
df = DataFrame([[1.53, 1.36], [0.06, 7.01]])
16871687
out = np.round(df, decimals=0)
16881688
expected = DataFrame([[2., 1.], [0., 7.]])
@@ -1693,7 +1693,7 @@ def test_numpy_round(self):
16931693
np.round(df, decimals=0, out=df)
16941694

16951695
def test_round_mixed_type(self):
1696-
# gh-11885
1696+
# GH 11885
16971697
df = DataFrame({'col1': [1.1, 2.2, 3.3, 4.4],
16981698
'col2': ['1', 'a', 'c', 'f'],
16991699
'col3': date_range('20111111', periods=4)})
@@ -1708,7 +1708,7 @@ def test_round_mixed_type(self):
17081708
tm.assert_frame_equal(df.round({'col3': 1}), df)
17091709

17101710
def test_round_issue(self):
1711-
# gh-11611
1711+
# GH 11611
17121712

17131713
df = pd.DataFrame(np.random.random([3, 3]), columns=['A', 'B', 'C'],
17141714
index=['first', 'second', 'third'])
@@ -1725,7 +1725,7 @@ def test_built_in_round(self):
17251725
pytest.skip("build in round cannot be overridden "
17261726
"prior to Python 3")
17271727

1728-
# gh-11763
1728+
# GH 11763
17291729
# Here's the test frame we'll be working with
17301730
df = DataFrame(
17311731
{'col1': [1.123, 2.123, 3.123], 'col2': [1.234, 2.234, 3.234]})
@@ -1736,7 +1736,7 @@ def test_built_in_round(self):
17361736
tm.assert_frame_equal(round(df), expected_rounded)
17371737

17381738
def test_pct_change(self):
1739-
# gh-11150
1739+
# GH 11150
17401740
pnl = DataFrame([np.arange(0, 40, 10), np.arange(0, 40, 10), np.arange(
17411741
0, 40, 10)]).astype(np.float64)
17421742
pnl.iat[1, 0] = np.nan
@@ -1769,7 +1769,7 @@ def test_clip(self, float_frame):
17691769
assert (float_frame.values == original.values).all()
17701770

17711771
def test_inplace_clip(self, float_frame):
1772-
# gh-15388
1772+
# GH 15388
17731773
median = float_frame.median().median()
17741774
frame_copy = float_frame.copy()
17751775

@@ -1785,7 +1785,7 @@ def test_inplace_clip(self, float_frame):
17851785
assert not (frame_copy.values != median).any()
17861786

17871787
def test_dataframe_clip(self):
1788-
# gh-2747
1788+
# GH 2747
17891789
df = DataFrame(np.random.randn(1000, 2))
17901790

17911791
for lb, ub in [(-1, 1), (1, -1)]:
@@ -1812,7 +1812,7 @@ def test_clip_mixed_numeric(self):
18121812

18131813
@pytest.mark.parametrize("inplace", [True, False])
18141814
def test_clip_against_series(self, inplace):
1815-
# gh-6966
1815+
# GH 6966
18161816

18171817
df = DataFrame(np.random.randn(1000, 2))
18181818
lb = Series(np.random.randn(1000))
@@ -1847,7 +1847,7 @@ def test_clip_against_series(self, inplace):
18471847
])
18481848
def test_clip_against_list_like(self, simple_frame,
18491849
inplace, lower, axis, res):
1850-
# gh-15390
1850+
# GH 15390
18511851
original = simple_frame.copy(deep=True)
18521852

18531853
result = original.clip(lower=lower, upper=[5, 6, 7],
@@ -1878,12 +1878,12 @@ def test_clip_against_frame(self, axis):
18781878

18791879
def test_clip_with_na_args(self, float_frame):
18801880
"""Should process np.nan argument as None """
1881-
# gh-17276
1881+
# GH 17276
18821882
tm.assert_frame_equal(float_frame.clip(np.nan), float_frame)
18831883
tm.assert_frame_equal(float_frame.clip(upper=np.nan, lower=np.nan),
18841884
float_frame)
18851885

1886-
# gh-19992
1886+
# GH 19992
18871887
df = DataFrame({'col_0': [1, 2, 3], 'col_1': [4, 5, 6],
18881888
'col_2': [7, 8, 9]})
18891889

@@ -1956,7 +1956,7 @@ def test_dot(self):
19561956
_np_version_under1p12,
19571957
reason="unpredictable return types under numpy < 1.12")
19581958
def test_matmul(self):
1959-
# matmul test is for gh-10259
1959+
# matmul test is for GH 10259
19601960
a = DataFrame(np.random.randn(3, 4), index=['a', 'b', 'c'],
19611961
columns=['p', 'q', 'r', 's'])
19621962
b = DataFrame(np.random.randn(4, 2), index=['p', 'q', 'r', 's'],
@@ -2070,7 +2070,7 @@ class TestNLargestNSmallest(object):
20702070
['b', 'c', 'c']])
20712071
@pytest.mark.parametrize('n', range(1, 11))
20722072
def test_n(self, df_strings, nselect_method, n, order):
2073-
# gh-10393
2073+
# GH 10393
20742074
df = df_strings
20752075
if 'b' in order:
20762076

@@ -2103,7 +2103,7 @@ def test_n_all_dtypes(self, df_main_dtypes):
21032103
df.nlargest(2, list(set(df) - {'category_string', 'string'}))
21042104

21052105
def test_n_identical_values(self):
2106-
# gh-15297
2106+
# GH 15297
21072107
df = pd.DataFrame({'a': [1] * 5, 'b': [1, 2, 3, 4, 5]})
21082108

21092109
result = df.nlargest(3, 'a')
@@ -2125,7 +2125,7 @@ def test_n_identical_values(self):
21252125
['c', 'b']])
21262126
@pytest.mark.parametrize('n', range(1, 6))
21272127
def test_n_duplicate_index(self, df_duplicates, n, order):
2128-
# gh-13412
2128+
# GH 13412
21292129

21302130
df = df_duplicates
21312131
result = df.nsmallest(n, order)
@@ -2137,7 +2137,7 @@ def test_n_duplicate_index(self, df_duplicates, n, order):
21372137
tm.assert_frame_equal(result, expected)
21382138

21392139
def test_duplicate_keep_all_ties(self):
2140-
# gh-16818
2140+
# GH 16818
21412141
df = pd.DataFrame({'a': [5, 4, 4, 2, 3, 3, 3, 3],
21422142
'b': [10, 9, 8, 7, 5, 50, 10, 20]})
21432143
result = df.nlargest(4, 'a', keep='all')
@@ -2154,7 +2154,7 @@ def test_duplicate_keep_all_ties(self):
21542154

21552155
def test_series_broadcasting(self):
21562156
# smoke test for numpy warnings
2157-
# gh-16378, gh-16306
2157+
# GH 16378, GH 16306
21582158
df = DataFrame([1.0, 1.0, 1.0])
21592159
df_nan = DataFrame({'A': [np.nan, 2.0, np.nan]})
21602160
s = Series([1, 1, 1])
@@ -2166,7 +2166,7 @@ def test_series_broadcasting(self):
21662166
getattr(df, op)(s_nan, axis=0)
21672167

21682168
def test_series_nat_conversion(self):
2169-
# gh-18521
2169+
# GH 18521
21702170
# Check rank does not mutate DataFrame
21712171
df = DataFrame(np.random.randn(10, 3), dtype='float64')
21722172
expected = df.copy()

0 commit comments

Comments
 (0)