In order to upgrade pandas on OSX (or *NIX), use pip:
sudo pip install pandas --upgrade
Need to do this as a SU.
Now suppose we have a dataframe df. To see a list of the indices, we simply call df.index. To determine the names of the columns, we call df.columns.
Individual columns of a DataFrame can be easily access. Suppose we have a DataFrame called humans:
In [32]: humans
Out[32]:
eye color gender height weight
0 blue male 1.706197 92.625849
1 brown female 1.600951 74.814092
2 blue male 1.793095 92.295413
3 brown female 1.679333 76.535305
4 blue female 1.468511 79.040913
5 green male 1.826871 87.132300
We can access a particular column of the DataFrame (DF) by indexing the DF as if it were a dict.
In [33]: humans['eye color']
Out[33]:
0 blue
1 brown
2 blue
3 brown
4 blue
5 green
6 brown