mercredi 8 mars 2017

If there is a space, remove string after the space

I have a dataframe:

          A         B     
  mediafile       201
  try media       200
 trialmedia       100
trial media       101

How do I remove the string "media" only if it is after a space? So final output would be:

         A         B     
 mediafile       201
trialmedia       100

Thanks!

Aucun commentaire:

Enregistrer un commentaire