I am relatively new to the world of Python and using McKinney's book to learn data analysis. My IDE is PyCharm Professional 2018.2
McKinney uses Line Magics to compute elapsed time.
import numpy as np
#Page 87 of 2nd Edition
my_arr = np.arange(1000000)
%time for _ in range(10): my_arr2 = my_arr*2
Now, the issue is that %time
generates Unresolved reference
error in PyCharm editor, although it runs without any error. As a beginner, I have no clue how to fix this. I have completed all the steps in SO: Unresolved reference issue in PyCharm, PyCharm unresolved reference when importing class from other file by doing this:
a) fixing interpreter - Anaconda 3.6
b) adding project path as source and to sys.path
c) Installing IPython from PyCharm
d) Clear cache and restart -- I have done this three times already......
Please note that when I run %time%...
by selecting that line, I don't get an error. Alternatively, if I run this directly in Python Terminal, I don't get an error at all.
Red underlines are very annoying. I'd appreciate if someone could guide me how to fix this.