I have a CSV file of data's which I want to push to Firebase using Python. The CSV has two columns title
and description
. I am successful in pushing the title columns
, but unable to figure out how to push the description column as well.
This is my code :
import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
import pandas as pd
df = pd.read_csv('csv_data.csv')
mylist.append(df)
ref = db.reference('testnode')
for item in df['title'] :
ref.push().set({
'title' : item,
'description' : 'description here'
})
This is the Output :
As you can see, the description key is hardcoded as : description here
How can i write the description to Firebase in the same way im writing the title values ?