Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV import with type detection #59

Closed
timClicks opened this issue Dec 19, 2013 · 2 comments
Closed

CSV import with type detection #59

timClicks opened this issue Dec 19, 2013 · 2 comments

Comments

@timClicks
Copy link

It would be nice if dataset made loading data from CSV easy too. Currently, you need to go via the csv.DictReader boilerplate to get things into a database.

Perhaps I am whinging too much about needing to insert this code into the start of my IPython Notebooks?

with open('yummy-data.csv') as f:
    headers = csv.reader(f).next()

records = []

with open('yummy-data.csv') as f:
    reader = csv.DictReader(f, fieldnames=headers)
    for i, row in enumerate(reader):
        if i > 0:
            records.append(row)
@pudo
Copy link
Owner

pudo commented Dec 19, 2013

IMO this would be out of scope, since parsing data is a bottomless pit and we have other libs to do it (e.g. messytables).

@gka
Copy link
Collaborator

gka commented Dec 19, 2013

yes, I too think this is out of scope

@pudo pudo closed this as completed Jan 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants