Shimoku docs
Resources on how to build a table with your data, and personalize it.

The method to use

The method is shimoku.plt.table()
It must contain the following input variables:
data: Union[str, DataFrame, List[Dict]]
menu_path: str
order: int
horizontal_scrolling: bool
overwrite: bool
And accepts the following input variables as optional:
title: Optional[str] = None
filter_columns: Optional[List[str]] = None
sort_table_by_cols: Optional[List] = None


1. Default configuration

This code generates a table with two filters:
data_ = [
{'date':, 1, 1), 'x': 5, 'y': 5, 'filtA': 'A', 'filtB': 'B'},
{'date':, 1, 2), 'x': 6, 'y': 5, 'filtA': 'B', 'filtB': 'Z'},
{'date':, 1, 3), 'x': 4, 'y': 5, 'filtA': 'C', 'filtB': 'W'},
{'date':, 1, 4), 'x': 7, 'y': 5, 'filtA': 'B', 'filtB': 'T'},
{'date':, 1, 5), 'x': 3, 'y': 5, 'filtA': 'A', 'filtB': 'Z'},
filter_columns: List[str] = ['filtA', 'filtB']
The result is:
The table is in the default configuration, it may be needed to scroll down the page.
The filters can be activated by clicking on them, and selecting the desired result:
Activating any filter by clicking on it.
Filtering for B using the filter filtA:
The choice of the filter appears as you select B.
The result is:
The result of a filter selection is shown.
You can rearrange alphabetically (direct or reverse order) the content of the table by clicking on a filter of your choice, in the body of the table. The result is like this:
Note the selection of filtA to show the alphabetical order.

2. Modifying the data frame and adding title:

You can personalize the table, changing column names in the input data frame, and add a title:
data_ = [
{'date':, 1, 1), 'Bus1': 5, 'Bus2': 5, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 2), 'Bus1': 6, 'Bus2': 7, 'filtA': 'B', 'filtB': 'Z'},
{'date':, 1, 3), 'Bus1': 4, 'Bus2': 5, 'filtA': 'A', 'filtB': 'W'},
{'date':, 1, 4), 'Bus1': 7, 'Bus2': 8, 'filtA': 'B', 'filtB': 'W'},
{'date':, 1, 5), 'Bus1': 3, 'Bus2': 5, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 6), 'Bus1': 5, 'Bus2': 5, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 7), 'Bus1': 6, 'Bus2': 7, 'filtA': 'B', 'filtB': 'Z'},
{'date':, 1, 8), 'Bus1': 4, 'Bus2': 5, 'filtA': 'A', 'filtB': 'W'},
{'date':, 1, 9), 'Bus1': 7, 'Bus2': 5, 'filtA': 'B', 'filtB': 'W'},
{'date':, 1, 10), 'Bus1': 3, 'Bus2': 7, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 11), 'Bus1': 5, 'Bus2': 5, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 12), 'Bus1': 6, 'Bus2': 5, 'filtA': 'B', 'filtB': 'Z'},
{'date':, 1, 13), 'Bus1': 4, 'Bus2': 8, 'filtA': 'A', 'filtB': 'W'},
{'date':, 1, 14), 'Bus1': 7, 'Bus2': 5, 'filtA': 'B', 'filtB': 'W'},
{'date':, 1, 15), 'Bus1': 3, 'Bus2': 5, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 16), 'Bus1': 5, 'Bus2': 8, 'filtA': 'A', 'filtB': 'Z'},
{'date':, 1, 17), 'Bus1': 6, 'Bus2': 5, 'filtA': 'B', 'filtB': 'Z'},
{'date':, 1, 18), 'Bus1': 4, 'Bus2': 7, 'filtA': 'A', 'filtB': 'W'},
{'date':, 1, 19), 'Bus1': 7, 'Bus2': 5, 'filtA': 'B', 'filtB': 'W'},
{'date':, 1, 20), 'Bus1': 3, 'Bus2': 7, 'filtA': 'A', 'filtB': 'Z'},
filter_columns: List[str] = ['filtA', 'filtB']
title="Amount of Buses in daily routes",
sort_table_by_col={'date': 'asc'},
And get this result:
Table with more data and title.
If you build a table with more than 10 rows, more pages are added and to show the entire table just click the > symbol:
Changing menu_path The menu_path can be modified.
It is possible to use any number of rows.
Copy link
On this page
The method to use
1. Default configuration
2. Modifying the data frame and adding title: