Series.unstack()
pandas.Series.unstack
-
Series.unstack(level=-1, fill_value=None)
-
Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame. The level involved will automatically get sorted.
Parameters: level : int, string, or list of these, default last level
Level(s) to unstack, can pass level name
fill_value : replace NaN with this value if the unstack produces
missing values
Returns: unstacked : DataFrame
Examples
登录查看完整内容