DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
apply on dataframe access multiple columns
df['col_3'] = df.apply(lambda x: x.col_1 + x.col_2, axis=1)
Source by codeforests.medium.com #
PREVIOUS
NEXT
Tagged:
#apply
#dataframe
#access
#multiple
#columns
ADD COMMENT
Topic
COMMENT
Name
1+7 =
Submit