We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c03af9a commit 7e53266Copy full SHA for 7e53266
pandas/tests/test_frame.py
@@ -7595,6 +7595,28 @@ def __nonzero__(self):
7595
self.assert_(r0.all())
7596
self.assert_(r1.all())
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
7620
7621
if __name__ == '__main__':
7622
# unittest.main()
0 commit comments