Difficulty With Applying DataFrame.replace()

Sample of 3 Entries from the Books DataFrame
Data Type of “Ratings”
Data Type of “Ratings” Unchanged
Create a List of ‘Ratings’
Check for Commas in ‘Ratings’
str.replace(old, new[, count])
Examples of str.replace()
DataFrame.replace(to_replace=None, value=None, inplace=False, limit=None, regex=False, method=’pad’)
First Attempt is Unsuccessful
Second Attempt, Slight Change to Syntax, is Not Successful Either
Third Attempt, with an EXACT string, is Not Successful Either
Success! No Commas in ‘Ratings’ Column
Viewing the Values in ‘iRatings’

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store