Although the first 2 are equivalent in output, the second is called chained indexing:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
the type also is a Series
for the second one:
In[48]:
type(df.loc['Second'])
Out[48]: pandas.core.series.Series
you then index the index value which then returns the scalar value:
In[47]:
df.loc['Second']
Out[47]:
price 2
count 3
Name: Second, dtype: int32
In[49]:
df.loc['Second']['count']
Out[49]: 3
Regarding the last one, the additional brackets returns a df which is why you see the index value rather than a scalar value:
In[44]:
type(df.loc[['Second']])
Out[44]: pandas.core.frame.DataFrame
So then passing the column, indexes this df and returns the matching column, as a Series
:
In[46]:
type(df.loc[['Second'],'count'])
Out[46]: pandas.core.series.Series
So it depends on what you want to achieve, but avoid the second form as it can lead to unexpected behaviour when attempting to assign to the column or df