I tried to add value to a new column for an existing data frame:
val_df["perplexity"][10]=14
There is no column named perplexity and I thought this will create the column. I guessed this answer says the same, but I got the following error:
KeyError: 'perplexity'
0val_df["perplexity"] = 0and then setting the other values with the for loop.