@@ -1506,15 +1506,15 @@ def test_big_table_frame(self):
15061506 recons = store .select ('df' )
15071507 assert isinstance (recons , DataFrame )
15081508
1509- print ("\n big_table frame [%s] -> %5.2f" % (rows , time .time () - x ))
1509+ com . pprint_thing ("\n big_table frame [%s] -> %5.2f" % (rows , time .time () - x ))
15101510
15111511 def test_big_table2_frame (self ):
15121512 # this is a really big table: 1m rows x 60 float columns, 20 string, 20 datetime
15131513 # columns
15141514 raise nose .SkipTest ('no big table2 frame' )
15151515
15161516 # create and write a big table
1517- print ("\n big_table2 start" )
1517+ com . pprint_thing ("\n big_table2 start" )
15181518 import time
15191519 start_time = time .time ()
15201520 df = DataFrame (np .random .randn (1000 * 1000 , 60 ), index = range (int (
@@ -1524,7 +1524,7 @@ def test_big_table2_frame(self):
15241524 for x in range (20 ):
15251525 df ['datetime%03d' % x ] = datetime .datetime (2001 , 1 , 2 , 0 , 0 )
15261526
1527- print ("\n big_table2 frame (creation of df) [rows->%s] -> %5.2f"
1527+ com . pprint_thing ("\n big_table2 frame (creation of df) [rows->%s] -> %5.2f"
15281528 % (len (df .index ), time .time () - start_time ))
15291529
15301530 def f (chunksize ):
@@ -1535,15 +1535,15 @@ def f(chunksize):
15351535
15361536 for c in [10000 , 50000 , 250000 ]:
15371537 start_time = time .time ()
1538- print ("big_table2 frame [chunk->%s]" % c )
1538+ com . pprint_thing ("big_table2 frame [chunk->%s]" % c )
15391539 rows = f (c )
1540- print ("big_table2 frame [rows->%s,chunk->%s] -> %5.2f"
1541- % (rows , c , time .time () - start_time ))
1540+ com . pprint_thing ("big_table2 frame [rows->%s,chunk->%s] -> %5.2f"
1541+ % (rows , c , time .time () - start_time ))
15421542
15431543 def test_big_put_frame (self ):
15441544 raise nose .SkipTest ('no big put frame' )
15451545
1546- print ("\n big_put start" )
1546+ com . pprint_thing ("\n big_put start" )
15471547 import time
15481548 start_time = time .time ()
15491549 df = DataFrame (np .random .randn (1000 * 1000 , 60 ), index = range (int (
@@ -1553,16 +1553,16 @@ def test_big_put_frame(self):
15531553 for x in range (20 ):
15541554 df ['datetime%03d' % x ] = datetime .datetime (2001 , 1 , 2 , 0 , 0 )
15551555
1556- print ("\n big_put frame (creation of df) [rows->%s] -> %5.2f"
1556+ com . pprint_thing ("\n big_put frame (creation of df) [rows->%s] -> %5.2f"
15571557 % (len (df .index ), time .time () - start_time ))
15581558
15591559 with ensure_clean_store (self .path , mode = 'w' ) as store :
15601560 start_time = time .time ()
15611561 store = HDFStore (self .path , mode = 'w' )
15621562 store .put ('df' , df )
15631563
1564- print (df .get_dtype_counts ())
1565- print ("big_put frame [shape->%s] -> %5.2f"
1564+ com . pprint_thing (df .get_dtype_counts ())
1565+ com . pprint_thing ("big_put frame [shape->%s] -> %5.2f"
15661566 % (df .shape , time .time () - start_time ))
15671567
15681568 def test_big_table_panel (self ):
@@ -1588,7 +1588,7 @@ def test_big_table_panel(self):
15881588 recons = store .select ('wp' )
15891589 assert isinstance (recons , Panel )
15901590
1591- print ("\n big_table panel [%s] -> %5.2f" % (rows , time .time () - x ))
1591+ com . pprint_thing ("\n big_table panel [%s] -> %5.2f" % (rows , time .time () - x ))
15921592
15931593 def test_append_diff_item_order (self ):
15941594
@@ -3538,9 +3538,9 @@ def test_string_select(self):
35383538 expected = df [df .x != 'none' ]
35393539 assert_frame_equal (result ,expected )
35403540 except Exception as detail :
3541- print ("[{0}]" .format (detail ))
3542- print (store )
3543- print (expected )
3541+ com . pprint_thing ("[{0}]" .format (detail ))
3542+ com . pprint_thing (store )
3543+ com . pprint_thing (expected )
35443544
35453545 df2 = df .copy ()
35463546 df2 .loc [df2 .x == '' ,'x' ] = np .nan
0 commit comments