I have a dataframe which looks like this -
df
A B
0 1 2
1 2 3
2 3 4
I'd like to create a function that could do the following -
df.numberformat['A']='0.2f'
I know this can be done using pandas.set_option('display.float_format', '{:.2f}'.format)
. However I'd like to create a class that inherits pandas.DataFrame
and create a functionality as mentioned before.
Any ideas.