like this, I want row [FPS≥18[%]] use percent not float, what should I do?
I’m not sure if you can display “%” inside this function (yet).
You just can make a function to tranform *100 when a % sign is in the row :
def transform_percentage_columns(df):
for column in df.columns:
if "%" in column:
# Multiply by 100 and format as percentage with "%"
df[column] = df[column].apply(lambda x: round(x * 100,2))
return df