简体   繁体   中英

How to replace value in a column of dataframe python?

How can i find value "100 e pìu" in age column and replace it by 100? This is a few rows of dataset

You can redefine column Age with new one, where values are replaced already:

df.Age = df.Age.replace('100 e più', 100)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM