Q:

How do brackets affect pandas.loc Dataframe Query

I can not grab the following result:
Assuming I have a dataframe calles df_sc
and 
bol1  = (df_sc['Language'] == 'EN')
bol2  = (df_sc['long_shortcut'] == myShortCut)

# XM1 is the name of a column
# the following two objects are different:

type(df_sc.loc[bol1 & bol2,['XML1']]) 
being:pandas.core.frame.DataFrame

type(df_sc.loc[bol1 & bol2,'XML1'])
being: pandas.core.series.Series

IN the documentation there is no mention as to how is the query interpreted when referring to only one column, within or not within a list.
What is the logic behind?
Thanks

A:

It is right there further down in the doc you linked:

Single label. Note this returns the row as a Series.

df.loc['viper']

max_speed    4
shield       5
Name: viper, dtype: int64

List of labels. Note using [[]] returns a DataFrame.

df.loc[['viper', 'sidewinder']]

            max_speed  shield
viper               4       5
sidewinder          7       8

It says List of labels. Note using [[]] returns a DataFrame. So, ['XML1'] is a list with single item. I think it is clear enough.

