import statsmodels.api as sm
= sm.datasets.get_rdataset("Duncan", "carData")
dataset = dataset.data
df df.head()
type | income | education | prestige | |
---|---|---|---|---|
rownames | ||||
accountant | prof | 62 | 86 | 82 |
pilot | prof | 72 | 76 | 83 |
architect | prof | 75 | 92 | 90 |
author | prof | 55 | 90 | 76 |
chemist | prof | 64 | 86 | 90 |