Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

read_sql mysql

import mysql.connector as sql

import pandas as pd

db_connection = sql.connect(host='hostname', database='db_name', 
user='username', password='password')

df = pd.read_sql('SELECT * FROM table_name', con=db_connection)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql
ADD COMMENT
Topic
Name
8+5 =