I have found two post here, which has some partial solution of my problem. First is here and second is here.
I have a little bit different situation. I have a list of data frames with the different length, which I want to join to the one data frame regarding row names. If, some row name is not in the data frame, the column should to have NaN
value.
For example I have next three data frames:
mylist[1]
-> df1:
num
a 1
b 1
mylist[2]
-> df2:
num
a 1
b 2
c 3
d 1
mylist[3]
-> df3:
num
c 1
d 1
What I want is to have the next DataFrame:
num1 num2 num3
a 1 1 NaN
b 1 2 NaN
c NaN 3 1
d NaN 1 1
It means, the NaN values are on the right place and not at the bottom of the column, like in the first example. The length of all DataFrames is different and not the same like in the second example.