Magic Keywords
Magic keywords are special commands you can run in cells that let you control the notebook itself or perform system calls such as changing directories. For example, you can set up matplotlib to work interactively in the notebook with Magic commands are preceded with one or two percent signs ( NOTE: These magic keywords are specific to the normal Python kernel. If you are using other kernels, these most likely won’t work. At some point, you’ll probably spend some effort optimizing code to run faster. Timing how quickly your code runs is essential for this optimization. You can use the As mentioned before, notebooks let you embed images along with text and code. This is most useful when you’re using Tip: On higher resolution screens such as Retina displays, the default images in notebooks can look blurry. Use With the Python kernel, you can turn on the interactive debugger using the magic command
Timing code
timeit
magic command to time how long it takes for a function to run, like so:Embedding visualizations in notebooks
matplotlib
or other plotting packages to create visualizations. You can use
Debugging in the Notebook
댓글을 달려면 로그인해야 합니다.