title: Python pandas: Keep selected column as DataFrame instead of Series
body: <p>When selecting a single column from a pandas DataFrame(say <code>df.iloc[:, 0]</code>, <code>df['A']</code>, or <code>df.A</code>, etc), the resulting vector is automatically converted to a Series instead of a single-column DataFrame. However, I am writing some functions that takes a DataFrame as an input argument. Therefore, I prefer to deal with single-column DataFrame instead of Series so that the function can assume say df.columns is accessible. Right now I have to explicitly convert the Series into a DataFrame by using something like <code>pd.DataFrame(df.iloc[:, 0])</code>. This doesn't seem like the most clean method. Is there a more elegant way to index from a DataFrame directly so that the result is a single-column DataFrame instead of Series?</p>