Skip to content

Instantly share code, notes, and snippets.

@vilterp
Created July 31, 2014 17:34
Show Gist options
  • Save vilterp/21e188cccb35a0d06fed to your computer and use it in GitHub Desktop.
Save vilterp/21e188cccb35a0d06fed to your computer and use it in GitHub Desktop.
def make_table(locations, variable):
columns = {}
for location in locations:
path = "C:\Users\Diego.Diego-PC\Documents\RDCEP\Experiments\DSSAT Outputs\\" + location + '.dssat_output'
table = pd.read_csv(path, skiprows=3, sep=' ', skipinitialspace=1)
columns[location] = table[variable]
return pd.DataFrame(data=columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment