Pandas populate new dataframe column based on matching columns in another dataframe
问题 I have a df which contains my main data which has one million rows . My main data also has 30 columns . Now I want to add another column to my df called category . The category is a column in df2 which contains around 700 rows and two other columns that will match with two columns in df . I begin with setting an index in df2 and df that will match between the frames, however some of the index in df2 doesn't exist in df . The remaining columns in df2 are called AUTHOR_NAME and CATEGORY . The