:
dic = {"A":["i1", "i2", "i3"], "B":["i1", "i4", "i5"], "C":["i1", "i2", "i5"]}
dict.fromkeys(), dic (aka dic.values()), list dic's (aka dic.keys()).
By understanding the dictionary, the result calculated in the last step will be the values of the data frame. Transport it so that the column headings become the axis of the indices and vice versa.
Fill Nansin later on "-".
pd.DataFrame({k:dict.fromkeys(v,k) for k,v in dic.items()}).T.fillna("-")

source
share