如何在打印(df.tostring())之后在Python中打印粗体

非常令人沮丧的是,我想在df.to_string()之后对我的df中的最后一列应用粗体 不幸的是,我无法执行此操作,因为出现此错误:“ Styler”对象没有属性“ to_string”

有任何想法吗 ?

def highlight_max(x):
    return ['font-weight: bold' if v == x.loc['Column_Total'] else ''
                for v in x]
dfs.style.apply(highlight_max)

decimals = 1
df1['Daily'] = df1['Daily'].apply(lambda x: round(x, decimals))
df1['Daily'] = df1['Daily'].apply(lambda x: "£{0:,.0f}".format((x)))
df1['Trade Date'] = pd.to_datetime(df1['Trade Date'])

df1['Trade Date'] = df1['Trade Date'].dt.strftime('%m/%d/%Y') 

df1 = df1.style.apply(highlight_max)
print(df1.to_string(columns=['Port','Date','Daily'], index=False))