I'm currently working with a pandas dataset (US startups) and am trying to aggregate sectors by keywords. In other words, I need to loop through a column and if a value contains a given string, replace the whole value with a new string.
If already tried some simple "if" statement loops, but can't seem to get the syntax right. I've also tried some .loc, but all I can seem to do is replace all values of the column with one string.
Thanks!