-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
Description
In [41]: df = DataFrame({'A' : [1,1,2], 'B' : list('aba'), 'C' : ['foo', np.nan, 'bar']}).set_index(['A','B'])
In [42]: df.unstack('B')
Out[42]:
C
B a b
A
1 foo NaN
2 bar None
In [43]: df.unstack('B', fill_value=np.nan)
Out[43]:
C
B a b
A
1 foo NaN
2 bar NaN
Introduced is this PR: #10246
you can make a case to do this as we DO support None
as a fill value, but almost always even with object columns we use np.nan
, unless very explicity set by the user.
Metadata
Metadata
Assignees
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate