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

When parsing date and time in get_qwdata and get_gwlevels data get lost. #27

Open
cjbas22 opened this issue Oct 25, 2022 · 0 comments
Open

Comments

@cjbas22
Copy link

cjbas22 commented Oct 25, 2022

Issue

When parsing date and time from separate columns the information contained in the raw data is used to generate a datetime object. It is common that only partial information is available in certain rows (e.g., a date is available without a time). This results in missing values (NaT). Since the original columns containing the information are not returned in the dataset, a significant part of the information is lost.

Functions with this issue: get_qwdata, get_gwlevels.

To Reproduce

These are two examples from the wto functions mentioned above:

get_qwdata. Run:

site_id = "04024000"
data = nwis.get_qwdata(sites=site_id)
df = data[0]
Explore df and observe the missing (NaT) values in the index.
Click here to see the raw data from this query (notice there are no missing dates here)

get_gwlevels. Run:

site_id = "375907091432201"
data = get_gwlevels(sites=site_id)
df = data[0]
Explore df and observe the missing (NaT) values in the index.
Click here to see the raw data from this query (notice there are no missing dates here)

Expected behavior

For all these missing values, in both functions, there is a date value available in the raw data queried. The output dataframe should contain all original columns to avoid losing data.

cjbas22 added a commit that referenced this issue Oct 25, 2022
This addresses issue #27 by modifying the function that parses date and time from get_qwdata and get_gwleveles avoiding data loss.
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