import pandas as pd
import matplotlib.pyplot as plt

df1 = pd.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
df2 = pd.DataFrame({'x': [1, 2, 3], 'y': [7, 8, 9]})

fig, axs = plt.subplots(nrows=2, ncols=1)

# How can I plot df1 in the first subplot and df2 in the second subplot?

plt.show()