Skip to content

Commit afbebb2

Browse files
committed
Unify GH reference for frame/test_analytics.py
1 parent e7c0cfe commit afbebb2

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

pandas/tests/frame/test_analytics.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def test_corr_cov_independent_index_column(self):
272272
assert result.index.equals(result.columns)
273273

274274
def test_corr_invalid_method(self):
275-
# GH PR #22298
275+
# GH 22298
276276
df = DataFrame(np.random.normal(size=(10, 2)))
277277
msg = ("method must be either 'pearson', 'spearman', "
278278
"or 'kendall'")
@@ -616,7 +616,7 @@ def test_count(self, float_frame_with_na, float_frame, float_string_frame):
616616
ct2 = frame.count(0)
617617
assert isinstance(ct2, Series)
618618

619-
# GH #423
619+
# GH 423
620620
df = DataFrame(index=lrange(10))
621621
result = df.count(1)
622622
expected = Series(0, index=df.index)
@@ -663,7 +663,7 @@ def test_sum(self, float_frame_with_na, mixed_float_frame,
663663
@pytest.mark.parametrize('method', ['sum', 'mean', 'prod', 'var',
664664
'std', 'skew', 'min', 'max'])
665665
def test_stat_operators_attempt_obj_array(self, method):
666-
# GH #676
666+
# GH 676
667667
data = {
668668
'a': [-0.00049987540199591344, -0.0016467257772919831,
669669
0.00067695870775883013],
@@ -805,7 +805,7 @@ def test_var_std(self, float_frame_with_na, datetime_frame, float_frame,
805805
@pytest.mark.parametrize(
806806
"meth", ['sem', 'var', 'std'])
807807
def test_numeric_only_flag(self, meth):
808-
# GH #9201
808+
# GH 9201
809809
df1 = DataFrame(np.random.randn(5, 3), columns=['foo', 'bar', 'baz'])
810810
# set one entry to a number in str format
811811
df1.loc[0, 'foo'] = '100'
@@ -1370,12 +1370,12 @@ def test_any_all_extra(self):
13701370
(np.any, {'A': Series([1, 2], dtype='category')}, True),
13711371
13721372
# # Mix
1373-
# GH-21484
1373+
# GH 21484
13741374
# (np.all, {'A': Series([10, 20], dtype='M8[ns]'),
13751375
# 'B': Series([10, 20], dtype='m8[ns]')}, True),
13761376
])
13771377
def test_any_all_np_func(self, func, data, expected):
1378-
# https://github.com/pandas-dev/pandas/issues/19976
1378+
# GH 19976
13791379
data = DataFrame(data)
13801380
result = func(data)
13811381
assert isinstance(result, np.bool_)
@@ -1387,7 +1387,7 @@ def test_any_all_np_func(self, func, data, expected):
13871387
assert result.item() is expected
13881388

13891389
def test_any_all_object(self):
1390-
# https://github.com/pandas-dev/pandas/issues/19976
1390+
# GH 19976
13911391
result = np.all(DataFrame(columns=['a', 'b'])).item()
13921392
assert result is True
13931393

@@ -1409,7 +1409,7 @@ def test_any_all_level_axis_none_raises(self, method):
14091409
# Isin
14101410

14111411
def test_isin(self):
1412-
# GH #4211
1412+
# GH 4211
14131413
df = DataFrame({'vals': [1, 2, 3, 4], 'ids': ['a', 'b', 'f', 'n'],
14141414
'ids2': ['a', 'n', 'c', 'n']},
14151415
index=['foo', 'bar', 'baz', 'qux'])
@@ -1421,7 +1421,7 @@ def test_isin(self):
14211421

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

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

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

14751475
def test_isin_tuples(self):
1476-
# GH16394
1476+
# GH 16394
14771477
df = DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']})
14781478
df['C'] = list(zip(df['A'], df['B']))
14791479
result = df['C'].isin([(1, 'a')])
@@ -1681,7 +1681,7 @@ def test_round(self):
16811681
expected_rounded['col1'])
16821682

16831683
def test_numpy_round(self):
1684-
# See gh-12600
1684+
# GH 12600
16851685
df = DataFrame([[1.53, 1.36], [0.06, 7.01]])
16861686
out = np.round(df, decimals=0)
16871687
expected = DataFrame([[2., 1.], [0., 7.]])
@@ -1692,7 +1692,7 @@ def test_numpy_round(self):
16921692
np.round(df, decimals=0, out=df)
16931693

16941694
def test_round_mixed_type(self):
1695-
# GH11885
1695+
# GH 11885
16961696
df = DataFrame({'col1': [1.1, 2.2, 3.3, 4.4],
16971697
'col2': ['1', 'a', 'c', 'f'],
16981698
'col3': date_range('20111111', periods=4)})
@@ -1707,7 +1707,7 @@ def test_round_mixed_type(self):
17071707
tm.assert_frame_equal(df.round({'col3': 1}), df)
17081708

17091709
def test_round_issue(self):
1710-
# GH11611
1710+
# GH 11611
17111711

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

1727-
# GH11763
1727+
# GH 11763
17281728
# Here's the test frame we'll be working with
17291729
df = DataFrame(
17301730
{'col1': [1.123, 2.123, 3.123], 'col2': [1.234, 2.234, 3.234]})
@@ -1768,7 +1768,7 @@ def test_clip(self, float_frame):
17681768
assert (float_frame.values == original.values).all()
17691769

17701770
def test_inplace_clip(self, float_frame):
1771-
# GH #15388
1771+
# GH 15388
17721772
median = float_frame.median().median()
17731773
frame_copy = float_frame.copy()
17741774

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

17861786
def test_dataframe_clip(self):
1787-
# GH #2747
1787+
# GH 2747
17881788
df = DataFrame(np.random.randn(1000, 2))
17891789

17901790
for lb, ub in [(-1, 1), (1, -1)]:
@@ -1811,7 +1811,7 @@ def test_clip_mixed_numeric(self):
18111811

18121812
@pytest.mark.parametrize("inplace", [True, False])
18131813
def test_clip_against_series(self, inplace):
1814-
# GH #6966
1814+
# GH 6966
18151815

18161816
df = DataFrame(np.random.randn(1000, 2))
18171817
lb = Series(np.random.randn(1000))
@@ -1846,7 +1846,7 @@ def test_clip_against_series(self, inplace):
18461846
])
18471847
def test_clip_against_list_like(self, simple_frame,
18481848
inplace, lower, axis, res):
1849-
# GH #15390
1849+
# GH 15390
18501850
original = simple_frame.copy(deep=True)
18511851

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

18771877
def test_clip_with_na_args(self, float_frame):
18781878
"""Should process np.nan argument as None """
1879-
# GH # 17276
1879+
# GH 17276
18801880
tm.assert_frame_equal(float_frame.clip(np.nan), float_frame)
18811881
tm.assert_frame_equal(float_frame.clip(upper=np.nan, lower=np.nan),
18821882
float_frame)
18831883

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

@@ -1954,7 +1954,7 @@ def test_dot(self):
19541954
_np_version_under1p12,
19551955
reason="unpredictable return types under numpy < 1.12")
19561956
def test_matmul(self):
1957-
# matmul test is for GH #10259
1957+
# matmul test is for GH 10259
19581958
a = DataFrame(np.random.randn(3, 4), index=['a', 'b', 'c'],
19591959
columns=['p', 'q', 'r', 's'])
19601960
b = DataFrame(np.random.randn(4, 2), index=['p', 'q', 'r', 's'],
@@ -2068,7 +2068,7 @@ class TestNLargestNSmallest(object):
20682068
['b', 'c', 'c']])
20692069
@pytest.mark.parametrize('n', range(1, 11))
20702070
def test_n(self, df_strings, nselect_method, n, order):
2071-
# GH10393
2071+
# GH 10393
20722072
df = df_strings
20732073
if 'b' in order:
20742074

@@ -2101,7 +2101,7 @@ def test_n_all_dtypes(self, df_main_dtypes):
21012101
df.nlargest(2, list(set(df) - {'category_string', 'string'}))
21022102

21032103
def test_n_identical_values(self):
2104-
# GH15297
2104+
# GH 15297
21052105
df = DataFrame({'a': [1] * 5, 'b': [1, 2, 3, 4, 5]})
21062106

21072107
result = df.nlargest(3, 'a')
@@ -2135,7 +2135,7 @@ def test_n_duplicate_index(self, df_duplicates, n, order):
21352135
tm.assert_frame_equal(result, expected)
21362136

21372137
def test_duplicate_keep_all_ties(self):
2138-
# see gh-16818
2138+
# GH 16818
21392139
df = DataFrame({'a': [5, 4, 4, 2, 3, 3, 3, 3],
21402140
'b': [10, 9, 8, 7, 5, 50, 10, 20]})
21412141
result = df.nlargest(4, 'a', keep='all')

0 commit comments

Comments
 (0)