how to slice a string in dataframe, start from left, based on different characters, such as ' /- . , I only want the first time this character shows up.
key name
1 McDonald's
2 CVS/PHARMACY
3 CVS/Store
4 WAL-MART
5 AMAZON.CO
expect result:
key name for_Group
1 McDonald's McDonald
2 CVS/PHARMACY CVS
3 CVS/Store CVS
4 WAL-MART WAL
5 AMAZON.CO AMAZON
I'm not sure if this need to use regular expression?