Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

split rows into multiple columns in pandas

df = pd.DataFrame(df.Raw_info.values.reshape(-1, 3), 
                   columns=['Function_name', 'prop1', 'prop2'])

print(df) 
  Function_name            prop1            prop2
0    Function_1  internal_prop_1  external_prop_1
1    Function_2  internal_prop_2  external_prop_2
2    Function_3  internal_prop_3  external_prop_3
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #rows #multiple #columns #pandas
ADD COMMENT
Topic
Name
9+8 =