You can also make components that query text using ipywidgets. Just make sure
you use display
when you're interested in showing dataframes.
import pandas as pd
import ipywidgets as widgets
df = pd.read_json("https://calmcode.io/datasets/pokemon.jsonl",
lines=True,
orient="record")
def reduce(q):
subset = df.loc[lambda d: d['name'].str.contains(q)]
display(subset)
q = widgets.Text()
out = widgets.interactive_output(reduce, {'q': q})
widgets.VBox([q, out])