I have 2 columns with string values in a data frame, Now I need to compare the 2 columns and retain those rows which has equal values in both the column and delete the remaining rows
Asked
Active
Viewed 16 times
0
-
`df2 = df[df['col1'].eq(df['col2'])]`? – mozway Apr 20 '22 at 21:32