Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

string contains method doesn't respect na argument #2806

Closed
hayd opened this Issue Feb 6, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

hayd commented Feb 6, 2013

It seems that the argument na doesn't remove the NaN with str.contains (see previous issue).

Using similar to example in test added for na functionality:

In [1]: values = Series(['om', NA, 'foo_nom', 'nom', 'bar_foo', NA, 'foo'])

In [2]: values.str.contains('foo', na=False)
Out[2]: 
0    False
1      NaN
2     True
3    False
4     True
5      NaN
6     True

In [3]: values.str.startswith('foo', na=False)
Out[3]: 
0    False
1    False
2     True
3    False
4    False
5    False
6     True

From Stackoverflow question.

Contributor

y-p commented Mar 14, 2013

closed via 024c97c

@y-p y-p closed this Mar 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment