Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

explode multiple columns pandas

(df.apply(lambda x: x.apply(pd.Series).stack())
              .reset_index()
              .drop('level_1', 1))
 
PREVIOUS NEXT
Tagged: #explode #multiple #columns #pandas
ADD COMMENT
Topic
Name
9+1 =