Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in notebook src/usgs_stations_json_csv.py #27

Closed
CatalinaYepes opened this issue Jan 3, 2024 · 0 comments
Closed

Error in notebook src/usgs_stations_json_csv.py #27

CatalinaYepes opened this issue Jan 3, 2024 · 0 comments

Comments

@CatalinaYepes
Copy link
Collaborator

When running the notebook the following error appears for the example for Puebla

AttributeError                            Traceback (most recent call last)
----> 3 # Read file using pandas
      4 
      5 stations = read_usgs_json(json_path)
      6 

~/earthquake-scenarios/src/usgs_stations_json_csv.py in ?(json_path)
     46 
     47         # Iterate over different columns. Each colum can be a component
     48         data = []
     49         pgas = []
---> 50         for index, chan in rec_sation.iteritems():
     51             try:
     52                 if chan["name"].endswith("Z") or chan["name"].endswith("U"):
     53                     continue

~/openquake/lib/python3.9/site-packages/pandas/core/generic.py in ?(self, name)
   5985             and name not in self._accessors
   5986             and self._info_axis._can_hold_identifiers_and_holds_name(name)
   5987         ):
   5988             return self[name]
-> 5989         return object.__getattribute__(self, name)

AttributeError: 'Series' object has no attribute 'iteritems'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant