BUG 0.20.0rc1: Empty series for `var`/`std` for frame with non-numeric columns
See original GitHub issueIn [1]: import pandas as pd
In [2]: pd.__version__
Out[2]: '0.20.0rc1'
In [3]: df = pd.DataFrame({'int': [1, 2, 3, 4],
...: 'float': [1., 2., 3., 4.],
...: 'str': ['a', 'b', 'c', 'd']})
In [4]: df.mean()
Out[4]:
float 2.5
int 2.5
dtype: float64
In [5]: df.std()
Out[5]:
Series([], dtype: float64)
In [6]: df.var()
Out[6]:
Series([], dtype: float64)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Non Numeric error while creating empty columns in data frame
My code for creating empty column is as follows: df1[15:118] <- sapply(1:104, "+", df1[[1]]). The code is giving out following error:
Read more >Find Non-Numeric Values in R (Example) - Statistics Globe
In this post, I'll illustrate how to identify non-numeric values in a vector or a data frame column in the R programming language....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
just pushed a PR to fix. was an oversight on
nanvar
(not directly related).That apply code is complicated, it was supposed to raise to break out of that, but was raising the wrong exception.
Right, I think that last traceback isn’t the real failure.
Do you know what in your
.agg
PR changed that caused this? I still don’t quite see what’s going on.