-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimportingsqlfile.py
More file actions
101 lines (34 loc) · 774 Bytes
/
Copy pathimportingsqlfile.py
File metadata and controls
101 lines (34 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env python
# coding: utf-8
# In[1]:
from sqlalchemy import create_engine
import pandas as pd
# In[2]:
conn = create_engine('mysql+pymysql://dm_team1:dm_team1123#@18.136.56.185:3306/project_banking')
# In[3]:
conn
# In[12]:
Cust_accnt='select * from Cust_Account'
# In[13]:
Cust_enq='select * from Cust_Enquiry'
# In[14]:
Cust_DEmg = 'select * from Cust_Demographics'
# In[16]:
data123 = pd.read_sql(Cust_accnt,conn)
# In[17]:
data123.head()
# In[ ]:
data = pd.read_sql(query3,conn)
# In[ ]:
data.shape()
# In[ ]:
data.to_csv('D:bank details/Cust_Demographics.csv')
# In[ ]:
data.head()
# # ENQUIRY FILE TRANSFORM
# In[ ]:
x=pd.read_csv('Cust_Demographics')
# In[ ]:
x.head()
# In[ ]:
# In[ ]: