Question: how to export mysql table data to excel file using python script?
Answer: Import all the modules (pymysql, xlwt, pandas. ... 
connect() method of pymysql will connect the mysql with the python. ... 
read_sql() method of pandas. ... 
Print the data frame.
to_excel() method of xlwt module will save the data in the excel sheet where ds.