I have a simple dataframe that contains Dates as columns and numbers as row values. I am attempting to add formatting to the numbers so that they display in currency format of $x.xx. I can't figure out what I am doing wrong as no error is produced and all the other formats I have are being applied except for the currency formatting. Below is a snippet of the code in question.
format_df = final_df.style. apply(lambda row: ['background-color: yellow'
if row.name in team_totals_index else 'background-color:#FFCC99' for value in row], axis=1).\
apply(lambda row: ['${:,.2f}' if row.name in team_totals_index else '' for value in row], axis=1).\
apply(lambda row: ['font-weight: bold' if row.name in team_totals_index else '' for value in row], axis=1).\
apply(lambda row: ['border-top-style:solid' if row.name in team_totals_index else '' for value in row], axis=1).\
apply(lambda row: ['border-bottom-style:solid' if row.name in team_totals_index else '' for value in row], axis=1)
any insight on how I could fix this so that the currency format will reflect properly?