Value error: Dataset Duncan was not found… here is a solution to the problem.
Value error: Dataset Duncan was not found
I’m running this tutorial using statsmodel
https://www.statsmodels.org/stable/examples/notebooks/generated/regression_plots.html
However, in this line,
prestige = sm.datasets.get_rdataset("Duncan", "car", cache=True).data
I got the error :
ValueError: Dataset Duncan was not found.
Any idea how to solve this problem? Thank you.
Solution
Change your code to
prestige = sm.datasets.get_rdataset("Duncan", "carData", cache=True).data
The package name in Rdataset has been changed from “car” to “carData”.