Skip to content

Commit

Permalink
TST: icol() should propegate fill_value for sparse data frames
Browse files Browse the repository at this point in the history
  • Loading branch information
y-p authored and wesm committed Nov 15, 2012
1 parent aed5896 commit 2335d10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pandas/tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,11 @@ def test_irow_icol_duplicates(self):
xp = df.ix[:, [0]]
assert_frame_equal(rs, xp)

def test_icol_sparse_propegate_fill_value(self):
from pandas.sparse.api import SparseDataFrame
df=SparseDataFrame({'A' : [999,1]},default_fill_value=999)
self.assertTrue( len(df['A'].sp_values) == len(df.icol(0).sp_values))

def test_iget_value(self):
for i, row in enumerate(self.frame.index):
for j, col in enumerate(self.frame.columns):
Expand Down

0 comments on commit 2335d10

Please sign in to comment.