O'Reilly logo
  • Som DUBEY thinks this is interesting:

In [35]: sp500[[1, 2]].head(3)

From

Cover of Mastering pandas for Finance

Note

This will not work in python 3 and above as this is written for pandas .15.1 and this is not available in pandas .22 and above