Boolean Indexing on an object type
Open
enhancement
topic:dataframe
- Dominant language
- Python
- Stars
- 693
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
How can I filter my dataset using standard pandas boolean indexing on an attribute that is detected as an object type ? (in the elastic mapping it is both indexed as "text" and "keyword"
Example:
``` python
df.dtypes
```
Results:
```
...
codeInstance object
...
dtype: object
```
``` python
df['codeInstance'].head()
```
Results:
```
YCzDDnkBdtlmoJ_PA5Qq instanceX
Name: codeInstance, dtype: object
```
``` python
df[df['codeInstance'] == 'instanceX'].head()
```
gives me 0 row.
I tried adding ".keyword" but it does not work either.
Contributor guide
Assessment
This issue has not been assessed yet.