@@ -236,27 +236,27 @@ def test_join_on(self):
236
236
237
237
def test_join_on_fails_with_different_right_index (self ):
238
238
with tm .assertRaises (ValueError ):
239
- df = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 3 ),
239
+ df = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 3 ),
240
240
'b' : np .random .randn (3 )})
241
- df2 = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 10 ),
241
+ df2 = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 10 ),
242
242
'b' : np .random .randn (10 )},
243
243
index = tm .makeCustomIndex (10 , 2 ))
244
244
merge (df , df2 , left_on = 'a' , right_index = True )
245
245
246
246
def test_join_on_fails_with_different_left_index (self ):
247
247
with tm .assertRaises (ValueError ):
248
- df = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 3 ),
248
+ df = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 3 ),
249
249
'b' : np .random .randn (3 )},
250
250
index = tm .makeCustomIndex (10 , 2 ))
251
- df2 = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 10 ),
251
+ df2 = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 10 ),
252
252
'b' : np .random .randn (10 )})
253
253
merge (df , df2 , right_on = 'b' , left_index = True )
254
254
255
255
def test_join_on_fails_with_different_column_counts (self ):
256
256
with tm .assertRaises (ValueError ):
257
- df = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 3 ),
257
+ df = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 3 ),
258
258
'b' : np .random .randn (3 )})
259
- df2 = DataFrame ({'a' : tm .choice (['m' , 'f' ], size = 10 ),
259
+ df2 = DataFrame ({'a' : np . random .choice (['m' , 'f' ], size = 10 ),
260
260
'b' : np .random .randn (10 )},
261
261
index = tm .makeCustomIndex (10 , 2 ))
262
262
merge (df , df2 , right_on = 'a' , left_on = ['a' , 'b' ])
0 commit comments