How can I directly read information from a MySQL database? #500
-
Directly obtaining data from the database is more convenient than CSV files. Beneficial for later data analysis. But I tried many methods, but there was no way. Maybe it's due to Pandas restrictions. |
Beta Was this translation helpful? Give feedback.
Answered by
longxiaofei
Mar 27, 2024
Replies: 1 comment
-
example: from pygwalker.data_parsers.database_parser import Connector
import pygwalker as pyg
conn = Connector(
"mysql+pymysql://username:password@host/database/schema",
"""
SELECT
*
FROM
XXX
"""
)
pyg.walk(conn) more detail refer it: https://pygwalker-docs.vercel.app/api-reference/dataset |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bbzcx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use latest pre-release pygwalker:
pip install --upgrade --pre pygwalker
install extra database client
pip install pymysql
example:
more detail refer it: https://pygwalker-docs.vercel.app/api-reference/dataset