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

Compilation error: 'Can only use .str accessor with string values!' #3

Open
amadsalmon opened this issue Nov 4, 2020 · 1 comment

Comments

@amadsalmon
Copy link

Error message:

length of df before:0
Traceback (most recent call last):
File "script.py", line 36, in
df = df[~df["Name"].str.contains("undefined")]
File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 5135, in getattr
return object.getattribute(self, name)
File "/usr/local/lib/python3.8/site-packages/pandas/core/accessor.py", line 187, in get
accessor_obj = self._accessor(obj)
File "/usr/local/lib/python3.8/site-packages/pandas/core/strings.py", line 2100, in init
self._inferred_dtype = self._validate(data)
File "/usr/local/lib/python3.8/site-packages/pandas/core/strings.py", line 2157, in _validate
raise AttributeError("Can only use .str accessor with string values!")
AttributeError: Can only use .str accessor with string values!

I will try to fix the bug and come back to you with a pull request.

@ObinnaIheanachor
Copy link
Owner

Okay, great no problem.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants