I have a dataframe as follows:
         A      B
 mediafile      1
 filemedia      1
media time      1
time media      1
How do I remove the word "media" only if it is the last string in the column. Final Output:
         A      B
 mediafile      1
      file      1
media time      1
     time       1
Thanks!