cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set font-size of values in each cell of dataframe?

vishavgupta988
New Contributor

I am working on pandas and python.After processing a particular dataframe in my program , I am appending that dataframe below an existing Excel file. Now problem is my excel has font size of 11 pt but dataframe has font size of 12 pt.I want to set font-size in my dataframe to be 11 pt while writing method df.to_excel. Is there any way to do this task?Simply I want to set font size of my dataframe so that while writing dataframe below an existing excel font size will be matched.

2 REPLIES 2

shyam_9
Valued Contributor
Valued Contributor

Hi @vishavgupta988,

Please go through the below pandas docs,

https://pandas.pydata.org/pandas-docs/stable/user_guide/style.html#Table-styles

DominicFHelms
New Contributor II

I like sharp fonts.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.