DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas compare two columns of different dataframe
df1['priceDiff?'] = np.where(df1['Price1'] == df2['Price2'], 0, df1['Price1'] - df2['Price2'])
Source by datatofish.com #
PREVIOUS
NEXT
Tagged:
#pandas
#compare
#columns
#dataframe
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit