Confusion Around AttributeError in Jupyter notebook via anaconda

I have been just introduced to machine learning through python, so while I was coding through jupyter notebook, it gave me a AttributeError, I was confused as I followed a tutorial which was like 3-4 years old from “codewithmosh”. Can anyone please say what is wrong and how can it be rectified. down is the code