Have two lists list1
and list2
. I'm trying to append these two lists into a final_list
.
Then convert it to a dataframe.
list1
list1 =[['a', 'e'], ['b', 'f'], ['c', 'g'], ['d', 'h']]
list2
list2 = [['1', '5'], ['2', '6'], ['3', '7'], ['4', '8']]
Sample Output:
Appended final_list
final_list = [['a', 'e'], ['b', 'f'], ['c', 'g'], ['d', 'h'],['1', '5'], ['2', '6'], ['3', '7'], ['4', '8']]
pd.DataFrame(final_list)
0 1
0 a e
1 b f
2 c g
3 d h
4 1 5
5 2 6
6 3 7
7 4 8