You are very close. You applied the round to the series of values given by df.value1. The return type is thus a Series. You need to assign that series back to the dataframe (or another dataframe with the same Index).

Also, there is a pandas.Series.round method which is basically a short hand for pandas.Series.apply(np.round).

>>> df.value1 = df.value1.round()
>>> print df
  item  value1  value2
0    a       1     1.3
1    a       2     2.5
2    a       0     0.0
3    b       3    -1.0
4    b       5    -1.0
Answer from Frames Catherine White on Stack Overflow
🌐
W3Schools
w3schools.com › python › pandas › ref_df_round.asp
Pandas DataFrame round() Method
Pandas Editor Pandas Quiz Pandas Exercises Pandas Syllabus Pandas Study Plan Pandas Certificate · DataFrames Reference · ❮ DataFrame Reference · Round each number in the DataFrame into 1 decimal numbers: import pandas as pd data = [[1.1235, ...
🌐
Educative
educative.io › answers › how-to-round-up-a-dataframe-in-pandas
How to round up a DataFrame in pandas
The round() function in pandas is used to round up a DataFrame to a specified number of decimal places.
🌐
GeeksforGeeks
geeksforgeeks.org › python › pandas-dataframe-round
Pandas DataFrame round() Method | Round Values to Decimal - GeeksforGeeks
The DataFrame.round() method in Pandas is used to round numerical values in a DataFrame to a specified number of decimal places.
Published   January 13, 2026
🌐
Note.nkmk.me
note.nkmk.me › home › python › pandas
pandas: Round, floor, and ceil for DataFrame and Series | note.nkmk.me
January 15, 2024 - You can round numbers in pandas.DataFrame and pandas.Series using the round() method. Note that it uses bankers' rounding, which means it rounds half to even (e.g., 0.5 rounds to 0.0). pandas.DataFram ...
🌐
DataScientYst
datascientyst.com › round-numbers-pandas-dataframe
How to Round Numbers in Pandas DataFrame
August 1, 2022 - We can define custom function in order to round down values in Pandas with decimal precision.
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › python › third-party › pandas › DataFrame › round
Python Pandas DataFrame round() - Round Numeric Values | Vultr Docs
December 24, 2024 - The round() function in pandas is a crucial tool for managing data precision across numerical datasets, often essential when dealing with large data frames or preparing data for presentation.
🌐
Programiz
programiz.com › python-programming › pandas › methods › round
Pandas round()
The round() method returns a new DataFrame with the data rounded to the given number of decimals. import pandas as pd # create a DataFrame data = {'Value1': [1.1234, 2.3456, 3.5678], 'Value2': [4.2345, 5.6789, 6.9123]} df = pd.DataFrame(data)
🌐
freeCodeCamp
freecodecamp.org › news › how-to-round-a-float-in-pandas
Pandas round() Method – How To Round a Float in Pandas
March 13, 2023 - The number of decimal places to be returned is passed in as a parameter. round(2) return rounds a number to two decimal places. ... import pandas as pd data = {'cost':[20.5550, 21.03535, 19.67373, 18.233233]} df = pd.DataFrame(data) ...
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.Timedelta.round.html
pandas.Timedelta.round — pandas 3.0.1 documentation
>>> td = pd.Timedelta('1001ms') >>> td Timedelta('0 days 00:00:01.001000') >>> td.round('s') Timedelta('0 days 00:00:01')
🌐
Apache
spark.apache.org › docs › latest › api › python › reference › pyspark.pandas › api › pyspark.pandas.DataFrame.round.html
pyspark.pandas.DataFrame.round — PySpark 4.1.1 documentation
>>> decimals = ps.Series([1, 0, 2], index=['A', 'B', 'C']) >>> df.round(decimals) A B C first 0.0 1.0 0.17 second 0.0 1.0 0.58 third 0.9 0.0 0.49
🌐
datagy
datagy.io › home › pandas tutorials › data analysis in pandas › pandas round: a complete guide to rounding dataframes
Pandas round: A Complete Guide to Rounding DataFrames • datagy
April 13, 2023 - If you’re in a hurry, check out the code block below. In order to round values in Pandas, you can use the .round() method:
🌐
Data to Fish
datatofish.com › round-values-pandas-dataframe
How to Round Values in a pandas DataFrame
# round to x number of decimals in one column df['column'].round(x) # entire df df.round(x) Let's say, you have the following DataFrame: import pandas as pd data = {'fish': ['salmon', 'pufferfish', 'shark'], 'length_m': [1.523, 0.2165, 2.1], 'width_cm': [10.2, 3.14159, 90.0] } df = pd.DataFrame(data) print(df) fish length_m width_cm 0 salmon 1.5230 10.20000 1 pufferfish 0.2165 3.14159 2 shark 2.1000 90.00000 ·
🌐
Saturn Cloud
saturncloud.io › blog › how-to-round-numbers-with-pandas
How to Round Numbers with Pandas | Saturn Cloud Blog
January 2, 2024 - To round a number to the nearest integer, you can use the astype() function with an argument of int. This will change the datatype of the values into integers truncating the decimal part, effectively converting the values to integers Here’s ...
🌐
Skytowner
skytowner.com › explore › pandas_dataframe_round_method
Pandas DataFrame | round method with Examples
Pandas DataFrame.round(~) method returns a DataFrame with all its numerical values rounded according to the specified parameters.
🌐
w3resource
w3resource.com › pandas › series › series-round.php
Pandas Series: round() function - w3resource
Pandas Series - round() function: The round() function is used to round each value in a Series to the given number of decimals.