Created
November 5, 2020 08:51
-
-
Save zilista/96cf3c1aa30bb650e9f271a1b80bf7ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql | |
sql = """SELECT ID, post_title from wp_posts where post_type='post' and post_status='publish' """ | |
# conn = psycopg2.connect(dbname=f'{dbname}', user=f'{user}', password=f'{password}', host=f'{host}') | |
conn = pymysql.connect('xx.xx.xx.xxx', 'xxx', | |
'xxx', 'xxx') | |
data = pd.read_sql_query(sql, conn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment