I imported matplotlib.pyplot as plt, then mistakenly defined a variable with the the function matplotlib.pyplot.xticks function name (i.e. plt.xticks = ... instead of plt.xticks(...)) in a Jupyter notebook. Then I tried to undo the definition with del plt.xticks and it removed the variable, but also the function. I tried reimporting matplotlib, but still plt.xticks is not there:
plt.xticks
AttributeError: module 'matplotlib.pyplot' has no attribute 'xticks'
In other notebooks the command works, even after reimporting the library. In this specific notebook I can get around the problem by import matplotlib. Is there another way around?