My problem is nearly exactly the same as the one answered here . I have 2 csv files with a common first column that I needed to merge based on the common values. I used the code from the first answer (pasted below but with my own values), and it worked perfectly, except for one thing, which as someone completely new to coding I do not know how to fix.
a = pd.read_csv("First_Half.csv")
b = pd.read_csv("Second_Half.csv")
merged = a.merge(b, on='Time')
merged.to_csv("Data.csv", index=False)
The 'First)Half' file is roughly 3 times the size of the 'Second_Half' file, there is a lot more data that I would still like to be represented, but the code above stops the moment there are no more matchups(aka when the shortest file ends) I have no idea how to keep the rest of the longer file without finding a completely different solution to the initial merging issue. Any help?
Thanks