A sample of my data file is below. Note that I have not included all of the header. Note also that often a specific data value is left blank (in this case CALL for rows 1 and 5 but it can be other columns too).
USAF WBAN STATION NAME CTRY ST CALL LAT LON ELEV(M) BEGIN END
703165 99999 SAND POINT US AK +55.333 -160.500 +0006.0 19730107 20041231
703210 25513 DILLINGHAM AIRPORT US AK PADL +59.050 -158.517 +0026.2 20060101 20200516
703210 99999 DILLINGHAM MUNI US AK PADL +59.050 -158.517 +0029.0 19730101 20051231
703260 25503 KING SALMON AIRPORT US AK PAKN +58.683 -156.656 +0020.4 19420110 20200516
703263 99999 KING SALMON US AK +58.683 -156.683 +0017.0 19801002 19960630
I'd like to simply read each column in as a different 1 dimensional numpy array. I've used the following code:
usaf, wban, name, ctry, st, call, lat3, lon3, elv, begin, end = \
np.genfromtxt('./documentation/isd-history.txt', \
dtype=('S6', 'S6', 'S30', 'S3', 'S5', 'S5', float, float, float, int, int), \
comments='None', delimiter=[6, 6, 30, 3, 5, 5, 9, 9, 8, 9, 9 ],\
skip_header=22, unpack=True)
I get the following error
ValueError: too many values to unpack
This seems like a pretty straightforward procedure but clearly I'm missing something. Any advice is appreciated.