Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ValueError: Dataset Duncan was not found

I am running this tutorial with 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 fix that? Thanks.

like image 940
user40780 Avatar asked May 02 '26 14:05

user40780


1 Answers

change your code to

prestige = sm.datasets.get_rdataset("Duncan", "carData", cache=True).data

Package name has been changed from "car" to "carData" in the Rdataset.

like image 170
Nipun Sampath Avatar answered May 05 '26 14:05

Nipun Sampath



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!