Skip to content

Commit 8576b9c

Browse files
committed
Unify GH reference for frame/test_analytics.py
1 parent 75b45e0 commit 8576b9c

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

Diff for: 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'
@@ -1371,12 +1371,12 @@ def test_any_all_extra(self):
13711371
(np.any, {'A': Series([1, 2], dtype='category')}, True),
13721372
13731373
# # Mix
1374-
# GH-21484
1374+
# GH 21484
13751375
# (np.all, {'A': Series([10, 20], dtype='M8[ns]'),
13761376
# 'B': Series([10, 20], dtype='m8[ns]')}, True),
13771377
])
13781378
def test_any_all_np_func(self, func, data, expected):
1379-
# https://github.com/pandas-dev/pandas/issues/19976
1379+
# GH 19976
13801380
data = DataFrame(data)
13811381
result = func(data)
13821382
assert isinstance(result, np.bool_)
@@ -1388,7 +1388,7 @@ def test_any_all_np_func(self, func, data, expected):
13881388
assert result.item() is expected
13891389

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

@@ -1410,7 +1410,7 @@ def test_any_all_level_axis_none_raises(self, method):
14101410
# Isin
14111411

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

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

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

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

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

16841684
def test_numpy_round(self):
1685-
# See 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-
# GH11885
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-
# GH11611
1711+
# GH 11611
17121712

17131713
df = 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-
# GH11763
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]})
@@ -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],
@@ -1877,12 +1877,12 @@ def test_clip_against_frame(self, axis):
18771877

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)