I have a df of high schools. I'm trying to strip out the generic endings of the school's name.
in[1]:df
out[2]:
time school
1 09:00 Brown Academy
2 10:00 Covfefe High School
3 11:00 Bradley High
4 12:00 Johnson Prep
school_endings = ['Academy','Prep,'High','High School']
Desired:
out[3]:
time school
1 09:00 Brown
2 10:00 Covfefe
3 11:00 Bradley
4 12:00 Johnson