Skip to content

Latest commit

 

History

History
176 lines (120 loc) · 2.48 KB

polars_dataframes.md

File metadata and controls

176 lines (120 loc) · 2.48 KB
jupytext kernelspec
formats text_representation
md:myst
extension format_name format_version jupytext_version
.md
myst
0.13
1.14.5
display_name language name
itables
python
itables

Polars dataframes

In this notebook we make sure that our test Polars dataframes are displayed nicely with the default itables settings.

from itables import init_notebook_mode, show
from itables.sample_dfs import get_dict_of_test_dfs

dict_of_test_dfs = get_dict_of_test_dfs(type="polars")
init_notebook_mode(all_interactive=True)

empty

show(dict_of_test_dfs["empty"])

No rows

show(dict_of_test_dfs["no_rows"])

No rows one column

show(dict_of_test_dfs["no_rows_one_column"])

No columns

show(dict_of_test_dfs["no_columns"])

No columns one row

show(dict_of_test_dfs["no_columns_one_row"])

bool

show(dict_of_test_dfs["bool"])

Nullable boolean

show(dict_of_test_dfs["nullable_boolean"])

int

show(dict_of_test_dfs["int"])

Nullable integer

show(dict_of_test_dfs["nullable_int"])

float

show(dict_of_test_dfs["float"])

str

show(dict_of_test_dfs["str"])

time

show(dict_of_test_dfs["time"])

ordered_categories

show(dict_of_test_dfs["ordered_categories"])

ordered_categories_in_multiindex

show(dict_of_test_dfs["ordered_categories_in_multiindex"])

multiindex

show(dict_of_test_dfs["multiindex"])

countries

:tags: [full-width]

show(dict_of_test_dfs["countries"])

capital

show(dict_of_test_dfs["capital"])

complex_index

:tags: [full-width]

show(dict_of_test_dfs["complex_index"])

int_float_str

show(dict_of_test_dfs["int_float_str"])

wide

:tags: [full-width]

show(dict_of_test_dfs["wide"], maxBytes=100000, maxColumns=100, scrollX=True)

long_column_names

:tags: [full-width]

show(dict_of_test_dfs["long_column_names"], scrollX=True)

named_column_index

show(dict_of_test_dfs["named_column_index"])

big_integers

import itables.options as opt

opt.warn_on_int_to_str_conversion = False

show(dict_of_test_dfs["big_integers"])