I have a Pandas series sf:
email
email1@email.com [1.0, 0.0, 0.0]
email2@email.com [2.0, 0.0, 0.0]
email3@email.com [1.0, 0.0, 0.0]
email4@email.com
to_frame():
Starting with the following Series, df:
email
email1@email.com A
email2@email.com B
email3@email.com C
dtype: int64
I use to_frame to convert the series to DataFrame:
df = df.to_frame().reset_index()
email 0
0 email1@email.com A
1 email2@email.com B
2 email3@email.com C
3 email4@email.com D
Now all you need is to rename the column name and name the index column:
df = df.rename(columns= {0: 'list'})
df.index.name = 'index'
Your DataFrame is ready for further analysis.
Update: I just came across this link where the answers are surprisingly similar to mine here.