Created
November 25, 2015 23:00
-
-
Save ericfourrier/7ff43be64582a9cc9881 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 pandas as pd | |
from sqlalchemy import create_engine | |
url = "http://mlr.cs.umass.edu/ml/machine-learning-databases/iris/iris.data" | |
headers = ['Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width', 'Class'] | |
iris = pd.read_csv(url, header=None, names=headers) | |
# absolute_path = 'sqlite:////{}'.format(path) | |
engine = create_engine('sqlite//:') | |
iris.to_sql('iris',engine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment