Skip to content

Commit

Permalink
Move filter query to separate line
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Aug 4, 2023
1 parent 94b7f06 commit 56c9fe0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/user_guide/jupyter_chart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,12 @@ is used to combine the chart and HTML table in a column layout.
if sel is None or 'Horsepower' not in sel:
filtered = source.iloc[:0]
else:
filtered = source.query(
filter_query = (
f"{sel['Horsepower'][0]} <= `Horsepower` <= {sel['Horsepower'][1]} & "
f"{sel['Miles_per_Gallon'][0]} <= `Miles_per_Gallon` <= {sel['Miles_per_Gallon'][1]}"
)
filtered = source.query(filter_query)
table_widget.value = filtered.to_html()
chart_widget.selections.observe(on_select, ["brush"])
Expand Down

0 comments on commit 56c9fe0

Please sign in to comment.