1

I have a series of company names, which have extra spaces before/after/in between the words. For example:

Current Data:
Vendor Parent Company
"ABC Company    "
"123    Company    "
"    CDF,   Inc  "

What I want:
Vendor Parent Company
"ABC Company"
"123 Company"
"CDF, Inc"

I have used str.strip() to get rid of the spaces before and after the text, but I can't find a way to get rid of the spaces between the words (ex: "ABC Comp").

martineau
  • 119,623
  • 25
  • 170
  • 301
Harvind
  • 11
  • 1
  • Thank you @Jean-FrançoisFabre , sorry for the duplicate question. I tried using regrex but it wasnt working out..found the issue, it was with my for loop. – Harvind Nov 06 '17 at 20:45

0 Answers0