Home > Blockchain >  Why do I receive attribute error for replacing a cells content in a dataframe?
Why do I receive attribute error for replacing a cells content in a dataframe?

Time:04-06

I tried

df3.at[294,'Initial Effective Date'].str.replace("5/26/19 and 8/2/20","8/2/20")

My dataframe(df3) has multiple columns and 300 rows of data. I have a column called initial eff date I just want to replace a cell at row 294 as it as above. but I get an error saying attribute error: 'str' object has no attribute 'str'

CodePudding user response:

Try

df3.at[294,'Initial Effective Date'] = "8/2/20"

.str.replace() method is for Series and you get only one cell (String) with .at()

  • Related