@@ -1506,15 +1506,15 @@ def test_big_table_frame(self):
1506
1506
recons = store .select ('df' )
1507
1507
assert isinstance (recons , DataFrame )
1508
1508
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 ))
1510
1510
1511
1511
def test_big_table2_frame (self ):
1512
1512
# this is a really big table: 1m rows x 60 float columns, 20 string, 20 datetime
1513
1513
# columns
1514
1514
raise nose .SkipTest ('no big table2 frame' )
1515
1515
1516
1516
# create and write a big table
1517
- print ("\n big_table2 start" )
1517
+ com . pprint_thing ("\n big_table2 start" )
1518
1518
import time
1519
1519
start_time = time .time ()
1520
1520
df = DataFrame (np .random .randn (1000 * 1000 , 60 ), index = range (int (
@@ -1524,7 +1524,7 @@ def test_big_table2_frame(self):
1524
1524
for x in range (20 ):
1525
1525
df ['datetime%03d' % x ] = datetime .datetime (2001 , 1 , 2 , 0 , 0 )
1526
1526
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"
1528
1528
% (len (df .index ), time .time () - start_time ))
1529
1529
1530
1530
def f (chunksize ):
@@ -1535,15 +1535,15 @@ def f(chunksize):
1535
1535
1536
1536
for c in [10000 , 50000 , 250000 ]:
1537
1537
start_time = time .time ()
1538
- print ("big_table2 frame [chunk->%s]" % c )
1538
+ com . pprint_thing ("big_table2 frame [chunk->%s]" % c )
1539
1539
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 ))
1542
1542
1543
1543
def test_big_put_frame (self ):
1544
1544
raise nose .SkipTest ('no big put frame' )
1545
1545
1546
- print ("\n big_put start" )
1546
+ com . pprint_thing ("\n big_put start" )
1547
1547
import time
1548
1548
start_time = time .time ()
1549
1549
df = DataFrame (np .random .randn (1000 * 1000 , 60 ), index = range (int (
@@ -1553,16 +1553,16 @@ def test_big_put_frame(self):
1553
1553
for x in range (20 ):
1554
1554
df ['datetime%03d' % x ] = datetime .datetime (2001 , 1 , 2 , 0 , 0 )
1555
1555
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"
1557
1557
% (len (df .index ), time .time () - start_time ))
1558
1558
1559
1559
with ensure_clean_store (self .path , mode = 'w' ) as store :
1560
1560
start_time = time .time ()
1561
1561
store = HDFStore (self .path , mode = 'w' )
1562
1562
store .put ('df' , df )
1563
1563
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"
1566
1566
% (df .shape , time .time () - start_time ))
1567
1567
1568
1568
def test_big_table_panel (self ):
@@ -1588,7 +1588,7 @@ def test_big_table_panel(self):
1588
1588
recons = store .select ('wp' )
1589
1589
assert isinstance (recons , Panel )
1590
1590
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 ))
1592
1592
1593
1593
def test_append_diff_item_order (self ):
1594
1594
@@ -3538,9 +3538,9 @@ def test_string_select(self):
3538
3538
expected = df [df .x != 'none' ]
3539
3539
assert_frame_equal (result ,expected )
3540
3540
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 )
3544
3544
3545
3545
df2 = df .copy ()
3546
3546
df2 .loc [df2 .x == '' ,'x' ] = np .nan
0 commit comments