Home > Enterprise >  Saving a list into xlsx - python
Saving a list into xlsx - python

Time:10-12

I am fairly new to python, and I am learning pandas.

I am trying to save a list into an excel file to have it all in one (two) columns with some index identifying records (like from each list these strings are comming) - I tried few things but i'm stuck here. Desirable output on the last screen I showed - any tips / help for newbie here? Thank you in advance.

enter image description here

enter image description here

CodePudding user response:

Try with stack:

>>> pd.DataFrame(data).stack().droplevel(1)
0    A
0    B
0    C
1    D
1    E
1    F
  • Related