Book Image

Learning IPython for Interactive Computing and Data Visualization

By : Cyrille Rossant
Book Image

Learning IPython for Interactive Computing and Data Visualization

By: Cyrille Rossant

Overview of this book

<p>You already use Python as a scripting language, but did you know it is also increasingly used for scientific computing and data analysis? Interactive programming is essential in such exploratory tasks and IPython is the perfect tool for that. Once you’ve learnt it, you won’t be able to live without it.<br /><br />"Learning IPython for Interactive Computing and Data Visualization" is a practical, hands-on, example-driven tutorial to considerably improve your productivity during interactive Python sessions, and shows you how to effectively use IPython for interactive computing and data analysis.<br /><br />This book covers all aspects of IPython, from the highly powerful interactive Python console to the numerical and visualization features that are commonly associated with IPython.</p> <p>You will learn how IPython lets you perform efficient vectorized computations, through examples covering numerical simulations with NumPy, data analysis with Pandas, and visualization with Matplotlib. You will also discover how IPython can be conveniently used to optimize your code using parallel computing and dynamic compilation in C with Cython.</p> <p>"Learning IPython for Interactive Computing and Data Visualization" will allow you to optimize your productivity in interactive Python sessions.</p>
Table of Contents (13 chapters)

IPython profiles


A profile is specific to a user on the local computer, and contains IPython preferences as well as the history, temporary and log files, and so on. By default, there is a single profile called the default profile. To create it manually, we can run the following command in the system shell:

ipython profile create

To specify a profile's name, we can use ipython profile create name.

Profile locations

Profiles are typically stored in ~/.ipython or ~/.config/ipython, where ~ is the current user's home directory. This directory is typically called the IPython directory and is sometimes referred to as IPYTHONDIR. To find the exact location of the profiles, we can run the ipython locate command for the IPython configuration directory, or ipython locate profile default for a specific profile directory, where default is the profile's name. A profile name is typically stored in a folder named profile_name within the IPython configuration folder.

By default, IPython starts with the default...