How can i connect database with help of function in jupyter notebook and then conver data into csv to build model ?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dd90d45a-dfbf-47a6-86b2-a4e600d4a9c9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEbKJVi%3DPfRdjN7AxWiEb-BuUZ_cjwinBpwrbQ9-iTi7e_hyrQ%40mail.gmail.com.
In thes case postgres = name of my databse , 0000 is my password , localhost=host, port = 5432, anyname = database name
4. con = engine.connect()
5. df=pd.read_sql_query(SQL queries #whatever you want to get from database)
and then saving that data in csv
6. df.to_csv('file_name.csv')To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/97217142-867e-4f5a-9c52-17fa3a6f7ce6n%40googlegroups.com.