elastic / elastic/eland

Boolean Indexing on an object type

Open
#348 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.