I have multiple .csv files to create data from django models into a
database using python pandas library. Can anyone suggest me how to do
perform this task.

import pandas as pd

df = pd.read_csv(RESOURCE_ROOT + '/data_files/102018_core_business.csv')

business_instance, created =
Business.objects.get_or_create(business_id=df['id'],
business_name=df['name'])


-- 
Mohd Aqib
Software Engineer
9873141865

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOh93neQTfW0CoepiyhQ57ziGDuw4fN0OTV6w-rJ%2BaXo0aUL%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to