2
('Total Answered Calls', 'sum') ('Calls Received', 'mean')
329                                   99.83249581
197                                   98.02631579
162                                   99.24242424
57                                    100
73                                    97.82608696

I want to in the given format with changed column names and values

Total Answered Calls          Calls Received
329                                   99%
197                                   98%
162                                   99%
57                                    100%
73                                    97%

1__
  • 1,511
  • 2
  • 9
  • 21
Alter Ego
  • 71
  • 1
  • 7
  • For column titles: Are those columns titles? If so you can do df.columns = ['Total Answered Calls', 'Calls Received']. Please check this sounds similar for me: https://stackoverflow.com/questions/37084812/how-to-remove-decimal-points-in-pandas – hemanta Nov 02 '19 at 03:47
  • Does this answer your question? [Add a percent sign to a dataframe column in Python](https://stackoverflow.com/questions/35661968/add-a-percent-sign-to-a-dataframe-column-in-python) – joelostblom Nov 02 '19 at 06:42

1 Answers1

1

If that's what you are looking for this may solve the problem:

data.columns = ['Total Answered Calls','Calls Received']
data['Calls Received'] = data['Calls Received'].astype(int).astype(str)+'%'
1__
  • 1,511
  • 2
  • 9
  • 21