Skip to content

Instantly share code, notes, and snippets.

@jtrive84
Created February 19, 2017 23:48
Show Gist options
  • Save jtrive84/3e9f6783c66e1be58206c462d1b1efcf to your computer and use it in GitHub Desktop.
Save jtrive84/3e9f6783c66e1be58206c462d1b1efcf to your computer and use it in GitHub Desktop.
Reading dataset with genfromtxt (numpy)
import numpy as np
fpath = "challenger.csv"
# Setting dtype to `None` forces genfromtxt to determine
# the datatypes of each column =>
res = np.genfromtxt(fname=fpath,
dtype=None,
delimiter=",",
autostrip=True,
names=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment