ValueError: x and y must have same first dimension, but have shapes (10,) and (11,)
I have copied the code exactly as is but get error: ValueError: x and y must have same first dimension, but have shapes (10,) and (11,).
I also run each cell before I run the code:
plt.xlabel('This is the horizontal axis')
1 answers ( 0 marked as helpful)
Thank you for reaching out!
The error tells you that the variables
values have different dimensions - the former is of length 10 and the latter -- of length 11. Revisit the definitions of both of these variables and run the code anew.
If the problem persists, please provide a screenshot of your code together with the error and the definition of these two variables.
Submit an answer
ValueError: Length mismatch: Expected axis has 15 elements, new values have 16 elements
Resolved: How do you set up different python version in your machine and when do we need it?
I made this try to answer Q3 but it doesn't work as the solution what's wrong here?