image

I have not been tracking many developments in the Python world for various reasons. Recently I stumbled on to this book and learnt that a ton of things have happened since the last version of my IPython installation. In the last one year or so, it has found a very strong community of pythonistas and is being used by professors in their classrooms. ipynb is turning out to be a format for submitting  programming assignments. With the nbviewer, all one has to do is to create a gist on github and anybody can view the notebook over the web. Here’s a Michigan university Professor narrating his experiences of using IPython in his class. Here’s someone writing about his experience of using it in a class at Columbia, All these are great developments show the general acceptance of Python as a language.  Recently I came to know that CBSE (India) has replaced C++ with Python for class XI students for 2013-2014 curriculum.

I guess it’s a matter of time before IPython will be the default environment for many python programmers, be it a beginner or an expert. Pandas creator Wes Mckinney goes gaga over IPython and says it is his primary mode of code development.  IPython is also being increasingly used by speakers at various conferences to share the code relevant to their talks.

Given the above context, this book is a great welcome. Instead of scouring tidbits of information/hacks from support forums, blog posts, user manuals, you get to know all the stuff about IPython at one place. The book is about 130 pages long and highlights everything that is possible using IPython.  The book starts off with a list of packages that are useful for data exploration. I learnt about Anaconda,  a product from Continuum Analytics, a firm founded by NumPy creator. It is such a big relief I must say. All the important packages are bundled up in to one executable and you are done with one installation. The packages used for various examples in the book are NumPy, SciPy, Matplotlib, NetworkX, Pandas, PIL, PySide, PyQt, Cython, Basemap, Numba. After the chapter on installation, the book goes on to explain ten essential aspects of IPython

  1. Running the IPython console
  2. Using it as a System shell
  3. Using the history _ , __, ___contain the last three output objects,_i, _ii,_iii contain the last three input objects respectively,_n and _in return the nth output and input history
  4. Tab completion
  5. Executing a script with the %run command
  6. %timeit  for benchmarking running times
  7. Quick debugging with `%debug` command
  8. %pylab fires up scientific computing capabilities.
  9. Using IPython notebook
  10. Customizing IPython

A sample dataset is taken up for analysis and the following features of IPython are explained :

  • Navigating through the file system
  • Exploring the history of all the commands entered
  • Import code from python script to IPython
  • Export code from IPython to notebook
  • Tab completion
  • Profiler
  • Literate Programming using Markdown
  • Graph Plotting
  • LaTeX support – I love this one

There is a brief chapter on NumPy, another one on Matplotlib. On a side note, I was so much away from tracking stuff in the Python community that I did not even know that Matplotlib creator, John Hunter, died last year battling with cancer. He will always be remembered for making available an awesome graphing library.

There is also a chapter on Parallel processing and another one on customizing IPython environment. So, despite being just 130 pages long, there is a lot of stuff that is packed in to the book.

Advertisements