|
@@ -1,19 +1,7 @@
|
|
|
-import datetime
|
|
|
+import pandas as pd
|
|
|
+import psycopg2
|
|
|
|
|
|
-import requests
|
|
|
-import ssl
|
|
|
-
|
|
|
-ssl._create_default_https_context = ssl._create_unverified_context
|
|
|
-
|
|
|
-requests.post("https://api.tianyunperfect.cn/web_history/location_history", json={
|
|
|
- "location_str": "tset",
|
|
|
- "location_xy": "test",
|
|
|
- "msg": "test",
|
|
|
- "create_time": "2022-10-01 1:1:1",
|
|
|
- "update_time": "2022-10-01 1:1:1",
|
|
|
-})
|
|
|
-
|
|
|
-
|
|
|
-def exec(obj):
|
|
|
- obj['jicha_person_180days'] = 777
|
|
|
- return obj
|
|
|
+eng_idc = psycopg2.connect(database='data_warehouse_bigtree', user='model', password='model123', host='10.0.54.80')
|
|
|
+sql = "select * from udt.model_score_monitor limit 5 offset 0;"
|
|
|
+data_df = pd.read_sql(sql=sql, con=eng_idc)
|
|
|
+# data_df.to_excel('excel1.xlsx', sheet_name='Sheet1', index=False) # index false为不写入索引
|