Skip to content

Commit 0e70a30

Browse files
committed
Unify GH reference for frame/test_analytics.py
1 parent 780dd84 commit 0e70a30

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

pandas/tests/frame/test_analytics.py

+26-26
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ 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 PR #22298
275-
df = pd.DataFrame(np.random.normal(size=(10, 2)))
274+
# GH 22298
275+
df = pd. DataFrame(np.random.normal(size=(10, 2)))
276276
msg = ("method must be either 'pearson', 'spearman', "
277277
"or 'kendall'")
278278
with tm.assert_raises_regex(ValueError, msg):
@@ -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'
@@ -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-
# https://github.com/pandas-dev/pandas/issues/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-
# https://github.com/pandas-dev/pandas/issues/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-
# see 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-
# GH4763
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-
# GH16394
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')])
@@ -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 = 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-
# 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],
@@ -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-
# GH10393
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-
# GH15297
2106+
# GH 15297
21072107
df = pd.DataFrame({'a': [1] * 5, 'b': [1, 2, 3, 4, 5]})
21082108

21092109
result = df.nlargest(3, 'a')
@@ -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-
# see 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')

0 commit comments

Comments
 (0)