Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas compare two columns of different dataframe

df3 = [(df2.type.isin(df1.type)) & (df1.value.between(df2.low,df2.high,inclusive=True))]
df1.join(df3)
Source by blog.softhints.com #
 
PREVIOUS NEXT
Tagged: #pandas #compare #columns #dataframe
ADD COMMENT
Topic
Name
7+4 =