Reputation: 45
I need to separate de causaaveria column into two columns. So that I have the description (string) in one column and the number on the other.
idalarmas fkidparque tag naerogenerador causaaveria
4670459 G1037 G1037_001_4_0 A0201 17516 Wtg running limited by P-F tool
Expected result:
idalarmas fkidparque tag naerogenerador event causaaveria
4670459 G1037 G1037_001_4_0 A0201 17516 Wtg running limited by P-F tool
Thanks!
Upvotes: 1
Views: 36
Reputation: 24314
Try with split()
:
df[['event','causaaveria']]=df['causaaveria'].str.split(' ',1,expand=True)
Upvotes: 1