Commit 09f742b6 authored by 张彦钊's avatar 张彦钊

change

parent 66e8adf8
......@@ -76,10 +76,10 @@ def get_order():
print("insert done")
def to_csv():
sql = "select device_id,service_id,created_time from meigou_order limit 6"
sql = "select device_id,service_id,created_time from meigou_order"
df = pd.DataFrame(list(get_mysql_data(host, port, user, passwd, db, sql)))
df = df.rename(columns={0: "user_id", 1: "service_id", 2: "created_time"})
df.to_csv('/tmp/csv/a.csv', index=False)
df.to_csv('/tmp/csv/meigou_order.csv', index=False)
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment