Python, Pandas, Data Science, Climate Change, Matplotlib.
ax2.plot(df_country.timestamp, gradient * dates + offset, label=area) ax1.grid() ax2.grid() ax2.legend() ax2.set_ylabel("Regression Lines [°C]") ax1.set_ylabel("Temperature change [°C]") In this function, we are using the get_level_values method on a pandas MultiIndex to efficiently query the data