File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -7595,6 +7595,28 @@ def __nonzero__(self):
7595
7595
self .assert_ (r0 .all ())
7596
7596
self .assert_ (r1 .all ())
7597
7597
7598
+ def test_strange_column_corruption_issue (self ):
7599
+ df = DataFrame (index = [0 ,1 ])
7600
+ df [0 ] = nan
7601
+ wasCol = {}
7602
+ # uncommenting these makes the results match
7603
+ #for col in xrange(100, 200):
7604
+ # wasCol[col] = 1
7605
+ # df[col] = nan
7606
+
7607
+ for i , dt in enumerate (df .index ):
7608
+ for col in xrange (100 , 200 ):
7609
+ if not col in wasCol :
7610
+ wasCol [col ] = 1
7611
+ df [col ] = nan
7612
+ df [col ][dt ] = i
7613
+
7614
+ myid = 100
7615
+
7616
+ first = len (df .ix [isnull (df [myid ]), [myid ]])
7617
+ second = len (df .ix [isnull (df [myid ]), [myid ]])
7618
+ self .assertTrue (first == second == 0 )
7619
+
7598
7620
7599
7621
if __name__ == '__main__' :
7600
7622
# unittest.main()
You can’t perform that action at this time.
0 commit comments