I'm trying to compare two sets of data - CO2 emissions from the UK and Thailand using a publicly available data set. I've used the below code to get separate line graphs however I am struggling to merge the two lines into one plot, can someone please help?
import pandas as pd
import matplotlib.pyplot as plt
download_url = (
"https://raw.githubusercontent.com/owid/co2-data/master/owid-co2-data.csv"
)
df = pd.read_csv(download_url)
type(df)
pd.set_option("display.max.columns", None)
uk = df[(df["country"] == 'United Kingdom')]
thailand = df[(df["country"] == 'Thailand')]
%matplotlib
uk.plot(x="year", y="co2")
thailand.plot(x="year", y="co2")