2
I have a spreadsheet where I need to find the month with the highest sales average.
With the code below I managed, but when I print the object appears all the disordered information as can be seen in the image.
I need to print the month with the highest billed amount for all employees (example: "August 2020 - Total Billed: 15,000"
The code I’m using.
dfseason = df.groupby(by='Month')['Billed'].sum().nlargest(1)
print(dfseason)
When printing the object I have the information as in the image
Using your method the output comes out exactly like mine.
– housekore
Well, then I don’t understand the question. What’s wrong with this exit? How would you like it to stay?
– Lucas
I need to manipulate this object and give an example print. May 2020 - Total Billed : 918
– housekore
Got it now. I’ll edit the answer
– Lucas
It is returning eight equal values (since it is eight months with values). It would be possible to return only one value?
– housekore