Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas apply output multiple columns

>>> appiled_df = df.apply(lambda row: fn(row.text), axis='columns', result_type='expand')
>>> df = pd.concat([df, appiled_df], axis='columns')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #apply #output #multiple #columns
ADD COMMENT
Topic
Name
5+6 =