How do I split the ID from annotation by using regex in the data frame below?
df=pd.DataFrame({"header":["SS50377_28860 All-trans-retinol 13,14-reductase"]})
So the columns supposed to be like this:
df_new=pd.DataFrame({"id":"SS50377_28860","header":["All-trans-retinol 13,14-reductase"]})
The following code doesn't work properly.
df.join(df["header"].str.split(r'\d+', 0, expand=True))
Thanks in advance!!