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

pandas updates and updated error catching #5

Open
wants to merge 6 commits into
base: nrcs_py3_fixes
Choose a base branch
from

Conversation

dschneiderch
Copy link

@dschneiderch dschneiderch commented May 14, 2021

Hi Jared,
I guess you aren't really working on this anymore but it's a shame because as you know most hydrologists don't have the skills to create this sorely needed tool!
a couple fixes for nrcs downloader that are mostly updates to pandas

  1. pd.sortlevel() is now pd.sort_index()
  2. pd datetime won't accept the unicode coming from suds so I used repr() to get the string representation where needed. maybe there is a better way?

at least the suds error is resolved in v1.4.x so closes #3

this resolves the issues I was having downloading station metadata.
Running the example in the README isn't working due to a missing ghcn files and I couldn't download the data from nrcs with read_obs() (it was returning an empty df, no error)

@dschneiderch
Copy link
Author

dschneiderch commented May 14, 2021

The last commit fixes the example in teh README. Instead of catching an OSERROR I changed it to a FileNotFoundError - based on the string your were searching for I think thats what you were doing. if the file didn't exist catch the error and download it. I don't know if any other errors are likely there besides filenotfound

closes #2

@dschneiderch dschneiderch changed the title pandas updates pandas updates and updated error catching May 14, 2021
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

Successfully merging this pull request may close these issues.

1 participant