Skip to content

Commit 2335d10

Browse files
y-pwesm
y-p
authored andcommitted
TST: icol() should propegate fill_value for sparse data frames
1 parent aed5896 commit 2335d10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/test_frame.py

+5
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,11 @@ def test_irow_icol_duplicates(self):
13271327
xp = df.ix[:, [0]]
13281328
assert_frame_equal(rs, xp)
13291329

1330+
def test_icol_sparse_propegate_fill_value(self):
1331+
from pandas.sparse.api import SparseDataFrame
1332+
df=SparseDataFrame({'A' : [999,1]},default_fill_value=999)
1333+
self.assertTrue( len(df['A'].sp_values) == len(df.icol(0).sp_values))
1334+
13301335
def test_iget_value(self):
13311336
for i, row in enumerate(self.frame.index):
13321337
for j, col in enumerate(self.frame.columns):

0 commit comments

Comments
 (0)