My dataframe looks like this
A B C
1 2 3
4 5 6
I want to add new rows to my dataframe in a forloop (not looping the existing dataframe)
for item in queryset:
if item == 'foo':
#append new row, with only column 'b' with value
df.append({'b' : item} , ignore_index=True)
But this method does not work. How could I add a new row to my existing dataframe?