Q. How are merge() and join() similar or different ? Support your answer with example.
Answer =
JOIN :- The join method works best when we are joining dataframes on their indexes (though you can specify another column to join on for the left dataframe).
MERGE :-The merge method is more versatile and allows us to specify columns besides the index to join on for both dataframes. If the index gets reset to a counter post merge, we can use set_index to change it back.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )