2

Hy all! I'm new in python and I faced a problem. I'm working in a pandas data frame, use the description function to get some descriptive statistics about the data frame and use the round function to get the results rounded it is works well, but if I want to use the round function along with the mean function I got an error. Here is the code: ratings['rating'].mean().round(2)

The error is AttributeError: 'float' object has no attribute 'round'

Can you explain why it is not working? Thanks

threwory
  • 31
  • 1
  • 1
  • 3

0 Answers0