Skip to content

Instantly share code, notes, and snippets.

View vincepota-zz's full-sized avatar

Vincenzo Pota vincepota-zz

View GitHub Profile
@rufuspollock
rufuspollock / csv2sqlite.py
Last active April 14, 2016 14:22
UPDATED VERSION NOW AT https://github.com/rgrp/csv2sqlite [Script to load CSV to SQLite]
#!/usr/bin/env python
# A simple Python script to convert csv files to sqlite (with type guessing)
#
# @author: Rufus Pollock
# Placed in the Public Domain
import csv
import sqlite3
def convert(filepath_or_fileobj, dbpath, table='data'):
if isinstance(filepath_or_fileobj, basestring):