from pandas import *
con = (
    'Your database connection credentials user, password, host, database to use'
    )
data = pd.read_sql_query('SELECT * FROM YOUR TABLE', conn=con)
Экспорт Python MySQL CSV в странную кодировку json