Код: Выделить всё
Top25_gt = (
GT(VoATable_Top25df)
.tab_header(
title = "MCBB D1 Vortex of Accuracy Ratings",
)
.fmt_number(
columns = ["OvrlVoA_MeanRating", "OffVoA_MeanRating", "DefVoA_MeanRating"],
decimals = 3
)
.fmt_number(
columns=["OvrlVoARanking"],
decimals=0
)
.data_color(
columns = ["OvrlVoA_MeanRating", "OffVoA_MeanRating"],
palette = "RdYlGn",
na_color = "white"
)
.data_color(
columns = ["DefVoA_MeanRating"],
palette = "RdYlGn",
reverse = True,
na_color = "white"
)
# Column Labels
.cols_label(
OvrlVoA_MeanRating = "Overall VoA Rating",
OvrlVoARanking = "VoA Ranking",
OffVoA_MeanRating = "Off VoA Rating",
OffVoARanking = "Off Ranking",
DefVoA_MeanRating = "Def VoA Rating",
DefVoARanking = "Def Ranking"
)
# Add source note
.tab_source_note(
source_note = "Table by @gshelor, Data from CBBD API"
)
)
Top25_gt.show()
Подробнее здесь: https://stackoverflow.com/questions/799 ... ith-python