I'm looking to rename certain values of my column based upon a certain string. My current data resembles this example:
PlayerID
Hank_Aaron+7
Babe Ruth+5
MMM + 7
Willie Mayes+1
MMM + 3
I would like to rename all observations that start with "MMM" to be just "MMM". For example, I want the above table to ultimately look like this:
PlayerID
Hank_Aaron+7
Babe Ruth+5
MMM
Willie Mayes+1
MMM
I also need to keep the column in the same dataframe so that I can use it for regressions. Thank you in advance!