Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #column #multiple #columns
ADD COMMENT
Topic
Name
8+8 =