Closed
Description
Code Sample, a copy-pastable example if possible
import pandas as pd
#Create sample dataframe
test = pd.DataFrame({"a":["12", float("nan"), "3", "meow" ]})
# Select rows that are null or numeric:
print len(test[ test["a"].isnull() | test["a"].str.isnumeric()])
# Select rows that are numeric or null
print len(test[ test["a"].str.isnumeric() | test["a"].isnull() ])
# These two should return the same result, right? Unfortunately they don't
Notice that Series.str.isnumeric
throws an exception on null entries. However, I believe that this may introduce bugs silently
Expected Output
Expected output is:
2
2
Instead, I get:
3
2
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
pandas: 0.18.1