@@ -1607,11 +1607,12 @@ def setUp(self):
16071607 self .factor = Categorical (['a' , 'b' , 'b' , 'a' , 'a' , 'c' , 'c' , 'c' ])
16081608
16091609 df = DataFrame ({'value' : np .random .randint (0 , 10000 , 100 )})
1610- labels = [ "{0} - {1}" .format (i , i + 499 ) for i in range (0 , 10000 , 500 ) ]
1610+ labels = ["{0} - {1}" .format (i , i + 499 ) for i in range (0 , 10000 , 500 )]
16111611 cat_labels = Categorical (labels , labels )
16121612
16131613 df = df .sort_values (by = ['value' ], ascending = True )
1614- df ['value_group' ] = pd .cut (df .value , range (0 , 10500 , 500 ), right = False , labels = cat_labels )
1614+ df ['value_group' ] = pd .cut (df .value , range (0 , 10500 , 500 ),
1615+ right = False , labels = cat_labels )
16151616 self .cat = df
16161617
16171618 def test_dtypes (self ):
@@ -2016,8 +2017,10 @@ def test_series_functions_no_warnings(self):
20162017
20172018 def test_assignment_to_dataframe (self ):
20182019 # assignment
2019- df = DataFrame ({'value' : np .array (np .random .randint (0 , 10000 , 100 ),dtype = 'int32' )})
2020- labels = Categorical (["{0} - {1}" .format (i , i + 499 ) for i in range (0 , 10000 , 500 )])
2020+ df = DataFrame ({'value' : np .array (
2021+ np .random .randint (0 , 10000 , 100 ), dtype = 'int32' )})
2022+ labels = Categorical (["{0} - {1}" .format (i , i + 499 )
2023+ for i in range (0 , 10000 , 500 )])
20212024
20222025 df = df .sort_values (by = ['value' ], ascending = True )
20232026 s = pd .cut (df .value , range (0 , 10500 , 500 ), right = False , labels = labels )
@@ -3131,7 +3134,7 @@ def test_slicing(self):
31313134 df = DataFrame ({'value' : (np .arange (100 ) + 1 ).astype ('int64' )})
31323135 df ['D' ] = pd .cut (df .value , bins = [0 , 25 , 50 , 75 , 100 ])
31333136
3134- expected = Series ([11 , Interval (0 , 25 )], index = ['value' ,'D' ], name = 10 )
3137+ expected = Series ([11 , Interval (0 , 25 )], index = ['value' , 'D' ], name = 10 )
31353138 result = df .iloc [10 ]
31363139 tm .assert_series_equal (result , expected )
31373140
@@ -3141,7 +3144,7 @@ def test_slicing(self):
31413144 result = df .iloc [10 :20 ]
31423145 tm .assert_frame_equal (result , expected )
31433146
3144- expected = Series ([9 , Interval (0 , 25 )],index = ['value' , 'D' ], name = 8 )
3147+ expected = Series ([9 , Interval (0 , 25 )], index = ['value' , 'D' ], name = 8 )
31453148 result = df .loc [8 ]
31463149 tm .assert_series_equal (result , expected )
31473150
0 commit comments