I am using this code to merge two csv files that are formatted like this:
buyer product
<address> <code>
<address> <code>
<address> <code>
and
product seller
<code> <address>
<code> <address>
<code> <address>
import pandas as pd
buyers = pd.read_csv("buyers.csv")
sellers = pd.read_csv("sellers.csv")
merged = pd.merge(buyers, sellers, on="product", how="outer")
merged.to_csv("merged.csv", index=False)
and my output csv looks like this:
buyer product seller
<address> <code>
<address> <code>
<address> <code>
The last column is completely blank and I can't seem to figure out why. Is there something wrong with my input or am I going about this completely wrong? I am trying to put the two data sets together such that they merge where the code is the same.
