I'm using IPython Notebook and would like to be able to control which type of output is returned from submitting a simple DataFrame name. For example:
df = DataFrame({"A": [1,2,3], "B": [4,5,6]})
df
will always return a grid representation because it such a small DataFrame. However larger DataFrames will show in HTML representation (at least with my settings in the notebook). That is, as long as there isn't more than about 15 columns, in which case the representation is something like this:
<class 'pandas.core.frame.DataFrame'>
Index: 35 entries, 6215.0 to 6028.0
Data columns:
District Name 35 non-null values
Total Percent Pass 35 non-null values
GE Percent Pass 35 non-null values
SE Percent Pass 3 non-null values
White Percent Pass 11 non-null values
Black Percent Pass 23 non-null values
Hispanic Percent Pass 21 non-null values
Asian Percent Pass 4 non-null values
PI Percent Pass 0 non-null values
AI Percent Pass 0 non-null values
Other Percent Pass 0 non-null values
EcDis Percent Pass 29 non-null values
Non EcDis Percent Pass 26 non-null values
Total Percent Pass_D 35 non-null values
GE Percent Pass_D 35 non-null values
SE Percent Pass_D 31 non-null values
White Percent Pass_D 27 non-null values
Black Percent Pass_D 35 non-null values
Hispanic Percent Pass_D 35 non-null values
Asian Percent Pass_D 19 non-null values
PI Percent Pass_D 0 non-null values
AI Percent Pass_D 0 non-null values
Other Percent Pass_D 0 non-null values
EcDis Percent Pass_D 35 non-null values
Non EcDis Percent Pass_D 35 non-null values
Comparative 35 non-null values
dtypes: float64(25), object(1)
I would like to be able to force this type of representation (the last one) at will without having to turn options on an off in the notebook. Is there a way to do this?