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

Search functionality doesn't work for gr.Dataframe #10663

Open
1 task done
jamie0725 opened this issue Feb 24, 2025 · 0 comments · May be fixed by #10631
Open
1 task done

Search functionality doesn't work for gr.Dataframe #10663

jamie0725 opened this issue Feb 24, 2025 · 0 comments · May be fixed by #10631
Assignees
Labels
bug Something isn't working 💾 Dataframe

Comments

@jamie0725
Copy link

jamie0725 commented Feb 24, 2025

Describe the bug

Notice another bug for gr.Dataframe, i.e., the search & filter functionality doesn't work for text cells.

Image Image Image

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import pandas as pd 
import gradio as gr

# Creating a sample dataframe
def run():
  df = pd.DataFrame({
      "A" : ["Apparel & Accessories", "Home & Garden", "Health & Beauty", "Cameras & Optics", "Apparel & Accessories"], 
      "B" : [6, 2, 54, 3, 2], 
      "C" : [3, 20, 7, 3, 8], 
      "D" : [2, 3, 6, 2, 6], 
      "E" : [-1, 45, 64, 32, 23]
  }) 
  df = df.style.map(color_num, subset=["E"])

  return df

# Function to apply text color

def color_num(value: float) -> str:
    color = "red" if value >= 0 else "green"
    color_style = "color: {}".format(color)

    return color_style

# Displaying the styled dataframe in Gradio
with gr.Blocks() as demo:
    gr.Textbox("{}".format(gr.__version__))
    a = gr.DataFrame(show_search="search")
    b = gr.Button("run")
    b.click(run,outputs=a)
    
demo.launch()

Screenshot

No response

Logs

System Info

gradio = 5.17.1

Severity

Blocking usage of gradio

@jamie0725 jamie0725 added the bug Something isn't working label Feb 24, 2025
@hannahblair hannahblair linked a pull request Mar 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💾 Dataframe
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants