import pandas as pd
DF = pd.DataFrame(DICTIONARY,
index = [r"$\lambda$="+str(i) for i in range(3)],
columns = [r"$\xi$="+str(j) for j in range(3)])
There are a few times when I have a dictionary (not very large) and try to convert it into a dataframe, the code above would yield one with each cell being NaN. Yet the code below works fine. I wonder what could be the difference?
DF = pd.DataFrame(DICTIONARY, index = [r"$\lambda$="+str(i) for i in range(3)])
DF.columns = [r"$\xi$="+str(j) for j in range(3)]