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

Nan values and pandas #53

Open
pnovoa opened this issue Jan 20, 2021 · 2 comments
Open

Nan values and pandas #53

pnovoa opened this issue Jan 20, 2021 · 2 comments

Comments

@pnovoa
Copy link

pnovoa commented Jan 20, 2021

Hi again, could you please take a look at the aggregation functions (e.g. mean) that you use with pandas Dataframe objects? Occasionally, a "TypeError: Could not convert .... to numeric" occurs. Apparently this error is caused due to the presence of some "nan" values in the column of the dataframe to be summarized. Maybe a solution would be to invoke the mean function as follows: dataframe.mean (skipna = True). Thank you!

@pnovoa
Copy link
Author

pnovoa commented Jan 23, 2021

I experienced the aforementioned problem again and tried to fix it with the following code in powercap.py (_parse function):

dt = pd.to_numeric(data[col], errors="coerce")
summary[col] = dt.mean()

@Breakend
Copy link
Owner

Hi, can you provide us with a stack trace for the error by any chance? We'd like to reproduce this. Also what platform are you running this on?

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

2 participants