I have a Pandas DataFrame that I\'m creating row-by-row (I know, I know, it\'s not Pandorable/Pythonic..). I\'m creating elements using .loc like so
The answer by MishaTeplitskiy works when the index label is 0. More generally, if you want to assign an array x to an element of a DataFrame df with row r and column c, you can use:
df.loc[[r], c] = pd.Series([x], index = [r])