ImportError: No module named ‘Tkinter’

You probably need to install it using one of (or something similar to) the following: You can also mention version number like this sudo apt-get install python3.7-tk for python 3.7. Why don’t you try this and let me know if it worked: Here is the reference link and here are the docs Better to check versions as suggested here: Or you … Read more

ValueError: shape mismatch: objects cannot be broadcast to a single shape

This particular error implies that one of the variables being used in the arithmetic on the line has a shape incompatible with another on the same line (i.e., both different and non-scalar). Since n and the output of np.add.reduce() are both scalars, this implies that the problem lies with xm and ym, the two of which are simply your x and y inputs minus their respective … Read more

DataFrame constructor not properly called! error

You are providing a string representation of a dict to the DataFrame constructor, and not a dict itself. So this is the reason you get that error. So if you want to use your code, you could do: But better would be to not create the string in the first place, but directly putting it in a … Read more