w3resource
Pandas Tutorial

Pandas Series: round() function

Round each value in Pandas Series

The round() function is used to round each value in a Series to the given number of decimals.

Syntax:

Series.round(self, decimals=0, *args, **kwargs)
Pandas Series round() function

Parameters:

Name Description Type/Default Value Required / Optional
decimals  Number of decimal places to round to (default: 0). If decimals is negative, it specifies the number of positions to the left of the decimal point.
int Required

Returns: Series
Rounded values of the Series.

Example:


Download the above Notebook from here.