
Я хочу изменить отправку значения aEV на aEV_percentile, но без потери стилей или, если быть более конкретным, без потери цвета фона aEV_percentile . Это мой беспорядочный код:
Код: Выделить всё
gradient = matplotlib.colors.LinearSegmentedColormap.from_list("", ['blue', 'white', '#f81707'])
data_style = players_data_df.style.format(mapper)
.background_gradient(subset=['aEV'], cmap=gradient,
vmin=players_data_df.aEV.min(),
vmax=players_data_df.aEV.max())
data_style = data_style
.background_gradient(subset=['aEV_percentile'], cmap=gradient,
vmin=players_data_df.aEV_percentile.min(),
vmax=players_data_df.aEV_percentile.max())
Код: Выделить всё
data_style.data['aEV_percentile'] = data_style.data['aEV']
Может быть, это невозможно. Я хочу сделать это, потому что считаю, что цвет градиента EV_percentile лучше отражает процентильную шкалу.
Подробнее здесь: https://stackoverflow.com/questions/791 ... -the-style
Мобильная версия