I have a CSV file with the header as Key and the data as the Value. My goal is to convert the CSV file into Json to upload into a database and output the data I uploaded. I
You can try to use .to_dict if you load your data in a dataframe.
df = pd.read_csv('so-emissions-by-world-region-in-million-tonnes.csv')
df.T.to_dict().values()
.to_dict() turns your dataframe in a map by columns (for each column you have index->value). By transposing and using .to_dict, this is a map by rows (for each index you have a map column->value). You don't need the keys, so just take .values()
Be careful, this is a dict_values object if you are using python 3.5, so you may want to use list() before converting to json.
By the way, you can also use dict(zip(columns, values)) to get a map column->value for each row, which is faster. In that case you don't need pandas at all.
edit: if the csv has no header, you need to pass it in the pd.read_csv() with keyword names=