Pandas 'unstack' on Dataframe outputs a series

52 views
Skip to first unread message

davidbria...@gmail.com

unread,
Jul 14, 2015, 5:26:39 PM7/14/15
to panda-pro...@googlegroups.com


What causes Pandas 'unstack' to output a series instead of a Dataframe?



import pandas as pd;

events = pd.DataFrame.from_csv('/Users/davidlaxer/gdelt/events/20150613.export.CSV', sep='\t', index_col='GLOBALEVENTID')

e = events.unstack()
type(e)


Reply all
Reply to author
Forward
0 new messages