Sometimes, you might want to format your DataFrame before writing it to a file such as an Excel sheet. df.style.format allows you to do that.
df.style.format
My previous tips on styling a pandas DataFrame.