from statsmodels.datasets import grunfeld data = grunfeld.load_pandas().data data = data.set_index(["firm","year"]) print(data.head())