reading external sql script in python

后端 未结 3 1910
天涯浪人
天涯浪人 2020-11-28 21:47

I am working on a learning how to execute SQL in python (I know SQL, not Python).

I have an external sql file. It creates and inserts data into three tables \'Zooke

3条回答
  •  执笔经年
    2020-11-28 22:16

    according me, it is not possible

    solution:

    1. import .sql file on mysql server

    2. after

      import mysql.connector
      import pandas as pd
      

      and then you use .sql file by convert to dataframe

提交回复
热议问题