Search Builder#
SearchBuilder let you build complex search queries. You just need to add it to the layout
by passing e.g. layout={"top1": "searchBuilder"}.
It is possible to set a predefined search, as we do in the below:
import itables
itables.init_notebook_mode()
df = itables.sample_dfs.get_countries(climate_zone=True)
itables.show(
df,
layout={"top1": "searchBuilder"},
searchBuilder={
"preDefined": {
"criteria": [
{"data": "climate_zone", "condition": "=", "value": ["Sub-tropical"]}
]
}
},
)
Loading ITables v2.9.0 from the init_notebook_mode cell...
(need help?)
|
| ⓘ | region | country | capital | longitude | latitude | climate_zone | hemisphere |
|---|---|---|---|---|---|---|---|
| code | |||||||
| AW | Latin America & Caribbean | Aruba | Oranjestad | -70.016700 | 12.516700 | Tropical | North |
| AF | South Asia | Afghanistan | Kabul | 69.176100 | 34.522800 | Sub-tropical | North |
| AO | Sub-Saharan Africa | Angola | Luanda | 13.242000 | -8.811550 | Tropical | South |
| AL | Europe & Central Asia | Albania | Tirane | 19.817200 | 41.331700 | Temperate | North |
| AD | Europe & Central Asia | Andorra | Andorra la Vella | 1.521800 | 42.507500 | Temperate | North |
| AE | Middle East & North Africa | United Arab Emirates | Abu Dhabi | 54.370500 | 24.476400 | Sub-tropical | North |
| AR | Latin America & Caribbean | Argentina | Buenos Aires | -58.417300 | -34.611800 | Sub-tropical | South |
| AM | Europe & Central Asia | Armenia | Yerevan | 44.509000 | 40.159600 | Temperate | North |
| AS | East Asia & Pacific | American Samoa | Pago Pago | -170.691000 | -14.284600 | Tropical | South |
| AG | Latin America & Caribbean | Antigua and Barbuda | Saint John's | -61.845600 | 17.117500 | Tropical | North |
| (198 more rows not shown) | |||||||