Black Lives Matter. Please consider donating to Black Girls Code today.

Special characters in filter

Hello,

i have successfuly build up my dashtable. But i have one big issue: when i type “eq gmail.com” to my email filter column it colors red and doesnt work. I tried to fix, but any special character (like dot) dont work for the filter…

i need to fix this, any suggesstions?

anyone? any chance to fix this ?

I think you can try to implement it yourself with back-end filtering, take a look here under “Backend Paging with Filtering”:

https://dash.plot.ly/datatable/callbacks

Looking at the code example,

for filter in filtering_expressions:
        if ' eq ' in filter:
            col_name = filter.split(' eq ')[0]
            filter_value = filter.split(' eq ')[1]
            dff = dff.loc[dff[col_name] == filter_value]

You could try to play around with this, or try to use the str.contains() method from Pandas

1 Like