Round each value in a Series to the given number of decimals.
Number of decimal places to round to. If decimals is negative, it specifies the number of positions to the left of the decimal point.
Additional arguments and keywords have no effect but might be accepted for compatibility with NumPy.
Rounded values of the Series.
See also
numpy.aroundRound values of an np.array.
DataFrame.roundRound values of a DataFrame.
Examples
>>> s = pd.Series([0.1, 1.3, 2.7])
>>> s.round()
0 0.0
1 1.0
2 3.0
dtype: float64
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Series.round.html