Welcme CIGI

Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Wed, Mar 13, 2019 at 5:13 PM Cigi Sebastine <cigisebast...@gmail.com>
wrote:

> Thank you Chetan.
>
>
> On Wed, Mar 13, 2019 at 3:41 AM Chetan Ganji <ganji.che...@gmail.com>
> wrote:
>
>> I would suggest you use transactions for inserting those many documents.
>> https://www.mongodb.com/transactions
>>
>> Django ORM does not support MongoDB. So, you can't use models/ORM/Class
>> Based Views of Django with mongo.
>> Only way I know to use Mongo with Django is function based views. There
>> are some third party MONGO ORMS for django, but I never used them so far,
>> so can't comment on how good they are or are not. Do your R&D and find it
>> out ;-)
>>
>> I hope this helps you. Cheers!
>>
>>
>> Regards,
>> Chetan Ganji
>> +91-900-483-4183
>> ganji.che...@gmail.com
>> http://ryucoder.in
>>
>>
>> On Wed, Mar 13, 2019 at 12:42 AM Ryan Nowakowski <tuba...@fattuba.com>
>> wrote:
>>
>>> If I were you, I'd work through the Django tutorial first. Then ask
>>> specific questions if you have any.
>>>
>>> On March 12, 2019 5:32:08 AM CDT, Cigi Sebastine <
>>> cigisebast...@gmail.com> wrote:
>>>>
>>>>
>>>> Hi all
>>>>
>>>> I am trying to insert data from csv file to mongodb4 using python3.7
>>>> (Bulk data insertion 47lakhs records)
>>>> i need to implement in django
>>>> Can please anyone share ur idea
>>>>
>>>> import pandas as pd
>>>> import json
>>>>
>>>> mng_client = MongoClient('localhost', 27017)
>>>> mng_db = mng_client['testcsv']
>>>> collection_name = mng_db['datastore']
>>>> db_cm = mng_db['datastore']
>>>>
>>>> df = pd.read_csv('filepath',encoding = 'ISO-8859-1') # loading csv file
>>>> #dfstr = df.to_json('testjson1.json')
>>>> data_json = json.loads( df.to_json())
>>>> db_cm.insert_many(data_json)
>>>>
>>>> --
>>> 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 django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> 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/89E98305-6AEC-4A82-9839-E86760DC3AB2%40fattuba.com
>>> <https://groups.google.com/d/msgid/django-users/89E98305-6AEC-4A82-9839-E86760DC3AB2%40fattuba.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> 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/CAMKMUjv%3DrU%3DNJxhd%2BHwpz40RrFB_Z2qP9Mq7q2SoXFys4HSO2Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMKMUjv%3DrU%3DNJxhd%2BHwpz40RrFB_Z2qP9Mq7q2SoXFys4HSO2Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> 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/CAAaRqFM-NALvhVJgcDXvRZoa7M-cgSURTbPMAQRcSUVxtH8THw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAaRqFM-NALvhVJgcDXvRZoa7M-cgSURTbPMAQRcSUVxtH8THw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/CAMKMUjsNd0BVch1zpjDU859DoGWiFTOGZ17e873C_vNwD9SfiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to