Shimoku docs
Search…
⌃K

Suffixes

Sometimes all of the values of a given column need an extension to convey more accurately the information, suffixes work great for this situation!
Using a dictionary you can define for each column a suffix that will be added to all the values:
data_ = [
{'date': dt.date(2021, 1, 1), 'Percentages': 5, 'Degrees': 5, 'Hexadecimals': 'A', 'Words that end in -one': 'B'},
{'date': dt.date(2021, 1, 2), 'Percentages': 6, 'Degrees': 5, 'Hexadecimals': 'B', 'Words that end in -one': 'Z'},
{'date': dt.date(2021, 1, 3), 'Percentages': 4, 'Degrees': 5, 'Hexadecimals': 'C', 'Words that end in -one': 'W'},
{'date': dt.date(2021, 1, 4), 'Percentages': 7, 'Degrees': 5, 'Hexadecimals': 'B', 'Words that end in -one': 'T'},
{'date': dt.date(2021, 1, 5), 'Percentages': 3, 'Degrees': 5, 'Hexadecimals': 'A', 'Words that end in -one': 'Z'},
]
value_suffixes = {'Percentages' : '%' ,
'Degrees' : '°' ,
'Hexadecimals' : 'h' ,
'Words that end in -one': 'one',
}
shimoku.plt.table(
data=data_,
menu_path='Shimoku tables',
order=0,
value_suffixes=value_suffixes,
)
The result of executing the previous code is:
Table with suffixes
This works with labeled colors when defining ranges for numeric values