You can use pd.Series.str.extract:

print (df["Test"].str.extract("([^\s]*)\s?(1.*)"))

         0                 1
0           1 RTWXA LC WTHML
1     2TE7  1 RHRRA LY HGHRL
2           1 WJKFD LF LPKRF
3  ATEGR/5  1 WJFTA LC TRGEH
4           1 POKJD LD PLERT
5   4ARF/3  1 EDFRT TG IUYHT

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top