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

string contains method doesn't respect na argument #2806

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

Comments

Projects
None yet
1 participant
@hayd
Copy link
Contributor

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.

@ghost

This comment has been minimized.

Copy link

commented Mar 14, 2013

closed via 024c97c

@ghost ghost closed this Mar 14, 2013

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.