I was on here a couple days ago, and I am going to try to reword my question better. I am working with Python and Pandas and trying to do a certain task. I am working with two dataframes and they both have student IDs in there. I want to be able to merge a new dataframe together if column 2 contains a student id that is in column one. Does anybody know how to do this? I tried researching and using pd.melt(),pd.merge(), and join. But I do not believe it does not get the job done for me.
Example in a df1 column, "student", id is 1234. If df2 has that same student ID, put it in the dataframe. That way I have all the grades of one particular student in one df and they are in a different df from a different group of students.
Unless you truly find the answer, please do not just mark as duplicate because I have been searching for days for the answer.