- Read Tutorial
- Watch Guide Video
In this guide, we're going to talk about the help pane and the autocompletion feature that Spyder has to offer. The help pane is a really handy tool that's built directly into Spyder. We can use it to find documentation for modules, classes, functions, and methods. So instead of constantly leaving Spyder to reference a user guide, we're able to access the documentation within the IDE itself.
To start, let's import NumPy, then move into the IPython console. A few guides back, we used linspace to make an array of numbers from zero to 15. Then we went into the user guide to see what attributes we had to include. To do the exact same thing from the console, all we have to do is pass in np.linspace.
If you're using a Mac, hit Command + I and if you're using a PC, I think you hit Control + I. From up in the help pane, you should see the linspace documentation. Next, open up the Preference window and click on Help. Just to the right, you should see two boxes. One that says Editor and the other says IPython Console. Select the console box and then hit OK. Then get rid of linspace. And pass in np.reshape and a parenthese.
If everything worked, instead of hitting Command + I, the reshape documentation should automatically show up in the help pane.
Now, if that's an option that you find helpful, but find yourself not always needing it, you can lock the help pane, which will stop it from automatically showing the documentation. And if you don't like any of those options, you can also just search by object.
That leaves us with the last topic in this guide, which is autocompletion. In the past, Spyder wasn't known for its autocomplete prowess. But recently, it's gotten much better since they integrated Kite. I'm not going to go into much detail but my general understanding is they have a fairly intuitive AI system that learns directly from your code and commonly related patterns on GitHub. The downside is that you actually have to grant Kite full access to your code and unlike Spyder, they're not an open source platform. I won't be showing you how Kite works, but if you want to give it a try, feel free to check out some of the videos on their website or on YouTube.
Throughout the course, I'll actually be using Kite whenever we're working with a new function. That way, we can talk about the required attributes without having to leave Spyder. That's about all I have for this guide. But hopefully this new technique makes searching for user documentation a little less annoying.