can anyone explain me these pandas code, Im looking at a EDA project on a Banking Data

Viewed 23

pd.set_option("precision", 2)

pd.options.display.float_format = '{:.2f}'.format

Im not able to figure out what these code line do

1 Answers

These code lines fix float numbers precision to two decimal places for pandas output. I belive it's done because your data is banking data, which contains a lot of different money amounts, which should be displayed with 2 decimal places (because there are 100 cents in a dollar)

Related