question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG 0.20.0rc1: Empty series for `var`/`std` for frame with non-numeric columns

See original GitHub issue
In [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:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jrebackcommented, Apr 25, 2017

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.

0reactions
TomAugspurgercommented, Apr 25, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found