Last answered:

15 Mar 2024

Posted on:

16 Dec 2023

0

Scatter plot is of different kind

With the exact code as in the lecture i am getting a diffetent kind of scatter plot or may be its not scattered. How can i get the one as shown in the lecture?

  

2 answers ( 0 marked as helpful)
Instructor
Posted on:

20 Dec 2023

0

Hey Durinder,


Thanks for reaching out.


The implementation on the screenshot looks exactly like the one from the lecture and therefore, I can't immediately tell what the issue is (it could be earlier in the code). Could you try restarting the kernel of your notebook and run it again in order? If this doesn't change the output, then please navigate to the resources, download the notebook complementing this lecture, and compare the code with yours.


Let me know if the issue persists.


Kind regards,

365 Hristina

Posted on:

15 Mar 2024

0

HI,

I hope you managed to solve it already. I encountered the same problem as well, and (at least for me) the cause of the problem was in the lecture where we created the dummies. Since we are working with newer versions of pandas, our dummies were labelled as 'True' or 'False' instead of 0 and 1.  A fellow student suggested to use .astype(int) to convert them to 0 and 1. However, this changes all columns to integers, including log_price, hence the different results. 

Hope this helps,

Dan

Submit an answer