Skip to content

Instantly share code, notes, and snippets.

@DanielAndreasen
Created May 20, 2015 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielAndreasen/4f90f4af84a88a6785a6 to your computer and use it in GitHub Desktop.
Save DanielAndreasen/4f90f4af84a88a6785a6 to your computer and use it in GitHub Desktop.
Reading messy harps csv file in python
fields = ['star', 'teff', 'erteff', 'logg', 'erlogg', 'logghip', 'erlogg', 'vt', 'ervt', 'metal', 'ermetal']
df = pd.read_csv('harps_all.dat', usecols=fields, delimiter=r'\s+')
print df.head()
print df.star
print df.ervt
print df['ervt']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment