Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split a column into multiple columns

df[['A', 'B']] = df['AB'].str.split(' ', 1, expand=True)
df['A'], df['B'] = df['AB'].str.split('-', 1).str
 
PREVIOUS NEXT
Tagged: #split #column #multiple #columns
ADD COMMENT
Topic
Name
2+3 =