I need to append two columns into one and separate them with an empty row
this is the current code (inspired by this question) :
import pandas as pd
df = pd.DataFrame({'Column 1':['A', 'B', 'C', 'D'],'Column 2':['E', 'F', 'G', 'H'],'Column 3':['I', 'J', 'K', 'L']})
df['col']=df['Column 1'].append(df['Column 2']).reset_index(drop=True)
print(df)
output:
Column 1 Column 2 Column 3 col
0 A E I A
1 B F J B
2 C G K C
3 D H L D
desired output:
Column 1 Column 2 Column 3 col
0 A E I A
1 B F J B
2 C G K C
3 D H L D
4 nan nan nan nan
5 nan nan nan E
6 nan nan nan F
7 nan nan nan G
8 nan nan nan H
is it doable?