@@ -272,7 +272,7 @@ def test_corr_cov_independent_index_column(self):
272
272
assert result .index .equals (result .columns )
273
273
274
274
def test_corr_invalid_method (self ):
275
- # GH PR # 22298
275
+ # GH 22298
276
276
df = DataFrame (np .random .normal (size = (10 , 2 )))
277
277
msg = ("method must be either 'pearson', 'spearman', "
278
278
"or 'kendall'" )
@@ -616,7 +616,7 @@ def test_count(self, float_frame_with_na, float_frame, float_string_frame):
616
616
ct2 = frame .count (0 )
617
617
assert isinstance (ct2 , Series )
618
618
619
- # GH # 423
619
+ # GH 423
620
620
df = DataFrame (index = lrange (10 ))
621
621
result = df .count (1 )
622
622
expected = Series (0 , index = df .index )
@@ -663,7 +663,7 @@ def test_sum(self, float_frame_with_na, mixed_float_frame,
663
663
@pytest .mark .parametrize ('method' , ['sum' , 'mean' , 'prod' , 'var' ,
664
664
'std' , 'skew' , 'min' , 'max' ])
665
665
def test_stat_operators_attempt_obj_array (self , method ):
666
- # GH # 676
666
+ # GH 676
667
667
data = {
668
668
'a' : [- 0.00049987540199591344 , - 0.0016467257772919831 ,
669
669
0.00067695870775883013 ],
@@ -805,7 +805,7 @@ def test_var_std(self, float_frame_with_na, datetime_frame, float_frame,
805
805
@pytest .mark .parametrize (
806
806
"meth" , ['sem' , 'var' , 'std' ])
807
807
def test_numeric_only_flag (self , meth ):
808
- # GH # 9201
808
+ # GH 9201
809
809
df1 = DataFrame (np .random .randn (5 , 3 ), columns = ['foo' , 'bar' , 'baz' ])
810
810
# set one entry to a number in str format
811
811
df1 .loc [0 , 'foo' ] = '100'
@@ -1370,12 +1370,12 @@ def test_any_all_extra(self):
1370
1370
(np .any , {'A' : Series ([1 , 2 ], dtype = 'category' )}, True ),
1371
1371
1372
1372
# # Mix
1373
- # GH- 21484
1373
+ # GH 21484
1374
1374
# (np.all, {'A': Series([10, 20], dtype='M8[ns]'),
1375
1375
# 'B': Series([10, 20], dtype='m8[ns]')}, True),
1376
1376
])
1377
1377
def test_any_all_np_func (self , func , data , expected ):
1378
- # https://github.com/pandas-dev/pandas/issues/ 19976
1378
+ # GH 19976
1379
1379
data = DataFrame (data )
1380
1380
result = func (data )
1381
1381
assert isinstance (result , np .bool_ )
@@ -1387,7 +1387,7 @@ def test_any_all_np_func(self, func, data, expected):
1387
1387
assert result .item () is expected
1388
1388
1389
1389
def test_any_all_object (self ):
1390
- # https://github.com/pandas-dev/pandas/issues/ 19976
1390
+ # GH 19976
1391
1391
result = np .all (DataFrame (columns = ['a' , 'b' ])).item ()
1392
1392
assert result is True
1393
1393
@@ -1409,7 +1409,7 @@ def test_any_all_level_axis_none_raises(self, method):
1409
1409
# Isin
1410
1410
1411
1411
def test_isin (self ):
1412
- # GH # 4211
1412
+ # GH 4211
1413
1413
df = DataFrame ({'vals' : [1 , 2 , 3 , 4 ], 'ids' : ['a' , 'b' , 'f' , 'n' ],
1414
1414
'ids2' : ['a' , 'n' , 'c' , 'n' ]},
1415
1415
index = ['foo' , 'bar' , 'baz' , 'qux' ])
@@ -1421,7 +1421,7 @@ def test_isin(self):
1421
1421
1422
1422
@pytest .mark .parametrize ("empty" , [[], Series (), np .array ([])])
1423
1423
def test_isin_empty (self , empty ):
1424
- # see gh- 16991
1424
+ # GH 16991
1425
1425
df = DataFrame ({'A' : ['a' , 'b' , 'c' ], 'B' : ['a' , 'e' , 'f' ]})
1426
1426
expected = DataFrame (False , df .index , df .columns )
1427
1427
@@ -1447,7 +1447,7 @@ def test_isin_dict(self):
1447
1447
tm .assert_frame_equal (result , expected )
1448
1448
1449
1449
def test_isin_with_string_scalar (self ):
1450
- # GH4763
1450
+ # GH 4763
1451
1451
df = DataFrame ({'vals' : [1 , 2 , 3 , 4 ], 'ids' : ['a' , 'b' , 'f' , 'n' ],
1452
1452
'ids2' : ['a' , 'n' , 'c' , 'n' ]},
1453
1453
index = ['foo' , 'bar' , 'baz' , 'qux' ])
@@ -1473,7 +1473,7 @@ def test_isin_df(self):
1473
1473
tm .assert_frame_equal (result , expected )
1474
1474
1475
1475
def test_isin_tuples (self ):
1476
- # GH16394
1476
+ # GH 16394
1477
1477
df = DataFrame ({'A' : [1 , 2 , 3 ], 'B' : ['a' , 'b' , 'f' ]})
1478
1478
df ['C' ] = list (zip (df ['A' ], df ['B' ]))
1479
1479
result = df ['C' ].isin ([(1 , 'a' )])
@@ -1681,7 +1681,7 @@ def test_round(self):
1681
1681
expected_rounded ['col1' ])
1682
1682
1683
1683
def test_numpy_round (self ):
1684
- # See gh- 12600
1684
+ # GH 12600
1685
1685
df = DataFrame ([[1.53 , 1.36 ], [0.06 , 7.01 ]])
1686
1686
out = np .round (df , decimals = 0 )
1687
1687
expected = DataFrame ([[2. , 1. ], [0. , 7. ]])
@@ -1692,7 +1692,7 @@ def test_numpy_round(self):
1692
1692
np .round (df , decimals = 0 , out = df )
1693
1693
1694
1694
def test_round_mixed_type (self ):
1695
- # GH11885
1695
+ # GH 11885
1696
1696
df = DataFrame ({'col1' : [1.1 , 2.2 , 3.3 , 4.4 ],
1697
1697
'col2' : ['1' , 'a' , 'c' , 'f' ],
1698
1698
'col3' : date_range ('20111111' , periods = 4 )})
@@ -1707,7 +1707,7 @@ def test_round_mixed_type(self):
1707
1707
tm .assert_frame_equal (df .round ({'col3' : 1 }), df )
1708
1708
1709
1709
def test_round_issue (self ):
1710
- # GH11611
1710
+ # GH 11611
1711
1711
1712
1712
df = DataFrame (np .random .random ([3 , 3 ]), columns = ['A' , 'B' , 'C' ],
1713
1713
index = ['first' , 'second' , 'third' ])
@@ -1724,7 +1724,7 @@ def test_built_in_round(self):
1724
1724
pytest .skip ("build in round cannot be overridden "
1725
1725
"prior to Python 3" )
1726
1726
1727
- # GH11763
1727
+ # GH 11763
1728
1728
# Here's the test frame we'll be working with
1729
1729
df = DataFrame (
1730
1730
{'col1' : [1.123 , 2.123 , 3.123 ], 'col2' : [1.234 , 2.234 , 3.234 ]})
@@ -1768,7 +1768,7 @@ def test_clip(self, float_frame):
1768
1768
assert (float_frame .values == original .values ).all ()
1769
1769
1770
1770
def test_inplace_clip (self , float_frame ):
1771
- # GH # 15388
1771
+ # GH 15388
1772
1772
median = float_frame .median ().median ()
1773
1773
frame_copy = float_frame .copy ()
1774
1774
@@ -1784,7 +1784,7 @@ def test_inplace_clip(self, float_frame):
1784
1784
assert not (frame_copy .values != median ).any ()
1785
1785
1786
1786
def test_dataframe_clip (self ):
1787
- # GH # 2747
1787
+ # GH 2747
1788
1788
df = DataFrame (np .random .randn (1000 , 2 ))
1789
1789
1790
1790
for lb , ub in [(- 1 , 1 ), (1 , - 1 )]:
@@ -1811,7 +1811,7 @@ def test_clip_mixed_numeric(self):
1811
1811
1812
1812
@pytest .mark .parametrize ("inplace" , [True , False ])
1813
1813
def test_clip_against_series (self , inplace ):
1814
- # GH # 6966
1814
+ # GH 6966
1815
1815
1816
1816
df = DataFrame (np .random .randn (1000 , 2 ))
1817
1817
lb = Series (np .random .randn (1000 ))
@@ -1846,7 +1846,7 @@ def test_clip_against_series(self, inplace):
1846
1846
])
1847
1847
def test_clip_against_list_like (self , simple_frame ,
1848
1848
inplace , lower , axis , res ):
1849
- # GH # 15390
1849
+ # GH 15390
1850
1850
original = simple_frame .copy (deep = True )
1851
1851
1852
1852
result = original .clip (lower = lower , upper = [5 , 6 , 7 ],
@@ -1876,12 +1876,12 @@ def test_clip_against_frame(self, axis):
1876
1876
1877
1877
def test_clip_with_na_args (self , float_frame ):
1878
1878
"""Should process np.nan argument as None """
1879
- # GH # 17276
1879
+ # GH 17276
1880
1880
tm .assert_frame_equal (float_frame .clip (np .nan ), float_frame )
1881
1881
tm .assert_frame_equal (float_frame .clip (upper = np .nan , lower = np .nan ),
1882
1882
float_frame )
1883
1883
1884
- # GH # 19992
1884
+ # GH 19992
1885
1885
df = DataFrame ({'col_0' : [1 , 2 , 3 ], 'col_1' : [4 , 5 , 6 ],
1886
1886
'col_2' : [7 , 8 , 9 ]})
1887
1887
@@ -1954,7 +1954,7 @@ def test_dot(self):
1954
1954
_np_version_under1p12 ,
1955
1955
reason = "unpredictable return types under numpy < 1.12" )
1956
1956
def test_matmul (self ):
1957
- # matmul test is for GH # 10259
1957
+ # matmul test is for GH 10259
1958
1958
a = DataFrame (np .random .randn (3 , 4 ), index = ['a' , 'b' , 'c' ],
1959
1959
columns = ['p' , 'q' , 'r' , 's' ])
1960
1960
b = DataFrame (np .random .randn (4 , 2 ), index = ['p' , 'q' , 'r' , 's' ],
@@ -2068,7 +2068,7 @@ class TestNLargestNSmallest(object):
2068
2068
['b' , 'c' , 'c' ]])
2069
2069
@pytest .mark .parametrize ('n' , range (1 , 11 ))
2070
2070
def test_n (self , df_strings , nselect_method , n , order ):
2071
- # GH10393
2071
+ # GH 10393
2072
2072
df = df_strings
2073
2073
if 'b' in order :
2074
2074
@@ -2101,7 +2101,7 @@ def test_n_all_dtypes(self, df_main_dtypes):
2101
2101
df .nlargest (2 , list (set (df ) - {'category_string' , 'string' }))
2102
2102
2103
2103
def test_n_identical_values (self ):
2104
- # GH15297
2104
+ # GH 15297
2105
2105
df = DataFrame ({'a' : [1 ] * 5 , 'b' : [1 , 2 , 3 , 4 , 5 ]})
2106
2106
2107
2107
result = df .nlargest (3 , 'a' )
@@ -2135,7 +2135,7 @@ def test_n_duplicate_index(self, df_duplicates, n, order):
2135
2135
tm .assert_frame_equal (result , expected )
2136
2136
2137
2137
def test_duplicate_keep_all_ties (self ):
2138
- # see gh- 16818
2138
+ # GH 16818
2139
2139
df = DataFrame ({'a' : [5 , 4 , 4 , 2 , 3 , 3 , 3 , 3 ],
2140
2140
'b' : [10 , 9 , 8 , 7 , 5 , 50 , 10 , 20 ]})
2141
2141
result = df .nlargest (4 , 'a' , keep = 'all' )
0 commit comments