Row Group

Row Group#

Use the RowGroup extension to group the data according to the content of one colum. Optionally, you can hide the content of that column to avoid duplicating the information.

import itables

itables.init_notebook_mode()

df = itables.sample_pandas_dfs.get_countries()

itables.show(
    df.sort_values("region"),
    rowGroup={"dataSrc": 1},
    columnDefs=[{"targets": 1, "visible": False}],
)
region country capital longitude latitude
code
KHEast Asia & PacificCambodiaPhnom Penh104.87400011.555600
MMEast Asia & PacificMyanmarNaypyidaw95.95620021.914000
KREast Asia & PacificKorea, Rep.Seoul126.95700037.532300
PHEast Asia & PacificPhilippinesManila121.03500014.551500
KPEast Asia & PacificKorea, Dem. People's Rep.Pyongyang125.75400039.031900
LAEast Asia & PacificLao PDRVientiane102.17700018.582600
PFEast Asia & PacificFrench PolynesiaPapeete-149.570000-17.535000
TVEast Asia & PacificTuvaluFunafuti179.089567-8.631488
GUEast Asia & PacificGuamAgana144.79400013.444300
MHEast Asia & PacificMarshall IslandsMajuro171.1350007.110460
(198 more rows not shown)