Skip to content

Instantly share code, notes, and snippets.

View ericfourrier's full-sized avatar
🦉
Building neat tools to secure cloud and source code

Eric Fourrier ericfourrier

🦉
Building neat tools to secure cloud and source code
View GitHub Profile
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)
@ericfourrier
ericfourrier / merge_dicts.py
Created July 4, 2015 14:04
merge list of python dictionnary
def merge_dict(list_dict):
return dict((k,v) for d in list_dict for (k,v) in d.items())