Show DataFrame or Series Type

Show DataFrame or Series Type#

You can display the type of the DataFrame or Series by setting the option show_df_type to True. By default, this option is set to False.

The type information appears below the table and shows the library and class name (e.g., pandas.DataFrame, polars.Series).

import itables

itables.init_notebook_mode()

You can change this behavior globally with:

itables.options.show_df_type = True

Or locally by passing show_df_type=True to the show function:

itables.show(itables.sample_dfs.get_countries(), show_df_type=True)
region country capital longitude latitude
code
AWLatin America & Caribbean ArubaOranjestad-70.01670012.516700
AFSouth AsiaAfghanistanKabul69.17610034.522800
AOSub-Saharan Africa AngolaLuanda13.242000-8.811550
ALEurope & Central AsiaAlbaniaTirane19.81720041.331700
ADEurope & Central AsiaAndorraAndorra la Vella1.52180042.507500
AEMiddle East & North AfricaUnited Arab EmiratesAbu Dhabi54.37050024.476400
ARLatin America & Caribbean ArgentinaBuenos Aires-58.417300-34.611800
AMEurope & Central AsiaArmeniaYerevan44.50900040.159600
ASEast Asia & PacificAmerican SamoaPago Pago-170.691000-14.284600
AGLatin America & Caribbean Antigua and BarbudaSaint John's-61.84560017.117500
(pandas.DataFrame; 198 more rows not shown)