-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
$ python -c 'import searvey; searvey.get_ndbc_stations()'
Traceback (most recent call last):
File "/home/panos/Prog/poseidon/searvey/.venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
return self._engine.get_loc(casted_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pandas/_libs/index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7096, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Location Lat/Long'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/panos/Prog/poseidon/searvey/searvey/_ndbc_api.py", line 100, in get_ndbc_stations
ndbc_stations = _get_ndbc_stations(
^^^^^^^^^^^^^^^^^^^
File "/home/panos/Prog/poseidon/searvey/searvey/_ndbc_api.py", line 35, in _get_ndbc_stations
stations_df[["lat", "ns", "lon", "ew"]] = stations_df["Location Lat/Long"].str.extract(
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/home/panos/Prog/poseidon/searvey/.venv/lib/python3.11/site-packages/pandas/core/frame.py", line 4107, in __getitem__
indexer = self.columns.get_loc(key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/panos/Prog/poseidon/searvey/.venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3819, in get_loc
raise KeyError(key) from err
KeyError: 'Location Lat/Long'