@@ -4626,7 +4626,6 @@ def test_to_csv_from_csv(self):
4626
4626
def test_to_csv_moar (self ):
4627
4627
from pandas .util .testing import makeCustomDataframe as mkdf
4628
4628
path = '__tmp_to_csv_moar__'
4629
- chunksize = 1000
4630
4629
4631
4630
def _do_test (df ,path ,r_dtype = None ,c_dtype = None ,rnlvl = None ,cnlvl = None ,
4632
4631
dupe_col = False ):
@@ -4705,33 +4704,33 @@ def stuple_to_tuple(x):
4705
4704
4706
4705
4707
4706
N = 100
4707
+ chunksize = 1000
4708
4708
4709
- for ncols in [128 ]:
4709
+ for ncols in [4 ]:
4710
4710
base = int ((chunksize // ncols or 1 ) or 1 )
4711
4711
for nrows in [2 ,10 ,N - 1 ,N ,N + 1 ,N + 2 ,2 * N - 2 ,2 * N - 1 ,2 * N ,2 * N + 1 ,2 * N + 2 ,
4712
4712
base - 1 ,base ,base + 1 ]:
4713
4713
_do_test (mkdf (nrows , ncols ,r_idx_type = 'dt' ,
4714
4714
c_idx_type = 's' ),path , 'dt' ,'s' )
4715
+ pass
4715
4716
4716
- for r_idx_type in ['i' ,'s' ,'u' ,'p' ]:
4717
- for c_idx_type in ['i' , 's' ,'u' ,'dt' ,'p' ]:
4718
- for ncols in [1 ,2 ,128 ]:
4719
- base = int ((chunksize // ncols or 1 ) or 1 )
4720
- for nrows in [2 ,10 ,N - 1 ,N ,N + 1 ,N + 2 ,2 * N - 2 ,2 * N - 1 ,2 * N ,2 * N + 1 ,2 * N + 2 ,
4721
- base - 1 ,base ,base + 1 ]:
4722
- _do_test (mkdf (nrows , ncols ,r_idx_type = r_idx_type ,
4723
- c_idx_type = c_idx_type ),path ,r_idx_type ,c_idx_type )
4724
-
4717
+ for r_idx_type ,c_idx_type in [('i' ,'i' ),('s' ,'s' ),('u' ,'dt' ),('p' ,'p' )]:
4718
+ for ncols in [1 ,2 ,3 ,4 ]:
4719
+ base = int ((chunksize // ncols or 1 ) or 1 )
4720
+ for nrows in [2 ,10 ,N - 1 ,N ,N + 1 ,N + 2 ,2 * N - 2 ,2 * N - 1 ,2 * N ,2 * N + 1 ,2 * N + 2 ,
4721
+ base - 1 ,base ,base + 1 ]:
4722
+ _do_test (mkdf (nrows , ncols ,r_idx_type = r_idx_type ,
4723
+ c_idx_type = c_idx_type ),path ,r_idx_type ,c_idx_type )
4725
4724
4726
- for ncols in [1 ,10 , 30 ]:
4725
+ for ncols in [1 ,2 , 3 , 4 ]:
4727
4726
base = int ((chunksize // ncols or 1 ) or 1 )
4728
4727
for nrows in [10 ,N - 2 ,N - 1 ,N ,N + 1 ,N + 2 ,2 * N - 2 ,2 * N - 1 ,2 * N ,2 * N + 1 ,2 * N + 2 ,
4729
4728
base - 1 ,base ,base + 1 ]:
4730
4729
print ( nrows ,ncols )
4731
4730
_do_test (mkdf (nrows , ncols ),path )
4732
4731
4733
4732
for nrows in [10 ,N - 2 ,N - 1 ,N ,N + 1 ,N + 2 ]:
4734
- df = mkdf (nrows , 10 )
4733
+ df = mkdf (nrows , 3 )
4735
4734
cols = list (df .columns )
4736
4735
cols [:2 ] = ["dupe" ,"dupe" ]
4737
4736
cols [- 2 :] = ["dupe" ,"dupe" ]
@@ -4745,7 +4744,7 @@ def stuple_to_tuple(x):
4745
4744
4746
4745
_do_test (DataFrame (index = range (10 )),path )
4747
4746
_do_test (mkdf (chunksize // 2 + 1 , 2 ,r_idx_nlevels = 2 ),path ,rnlvl = 2 )
4748
- for ncols in [2 ,10 , 30 ]:
4747
+ for ncols in [2 ,3 , 4 ]:
4749
4748
base = int (chunksize // ncols )
4750
4749
for nrows in [10 ,N - 2 ,N - 1 ,N ,N + 1 ,N + 2 ,2 * N - 2 ,2 * N - 1 ,2 * N ,2 * N + 1 ,2 * N + 2 ,
4751
4750
base - 1 ,base ,base + 1 ]:
@@ -6833,7 +6832,7 @@ def test_where_bug(self):
6833
6832
def test_where_datetime (self ):
6834
6833
6835
6834
# GH 3311
6836
- df = DataFrame (dict (A = date_range ('20130102' ,periods = 5 ),
6835
+ df = DataFrame (dict (A = date_range ('20130102' ,periods = 5 ),
6837
6836
B = date_range ('20130104' ,periods = 5 ),
6838
6837
C = np .random .randn (5 )))
6839
6838
0 commit comments