0
Unnamed: 0             0
0_ADNI        233.935909
1_ADNI        171.077273
2_ADNI        240.887273
3_ADNI        272.705909
                 ...
Year                   7
Location              37

Is there an easy way to convert pandas series above to a dataframe? I want output like:

0_ADNI         1_ADNI        2_ADNI       3_ADNI   .... Year     Location
233.935909     171.077273   240.887273    272.705909      7         37

I tried the following, but they do not work

series.to_frame()

or

pd.Dataframe(series)
user308827
  • 21,227
  • 87
  • 254
  • 417

0 Answers0