Q:

Showing Pandas data frame as a table

since I have installed the updated version of pandas every time I type in the name of a dataframe, e.g.
df[0:5]

To see the first few rows, it gives me a summary of the columns, the number of values in them and the data types instead.
How do I get to see the tabular view instead? (I am using iPython btw).
Thanks in advance!

A:

Note: To show the top few rows you can also use head.
However, pandas will show the summary view if there are more columns than display.max_columns or they are longer than display.width (analogously for rows), so you'll need to increase these to show a tabular view. You can change these using set option, for example:
pd.options.display.max_columns = 50

See this pandas issue: "Unintuitive default behavior with wide DataFrames in the IPython notebook".
Alternatively, show the first few rows for the first few columns you can use:
df.head(5)[df.columns[0:4]]
# alternatively
df.iloc[:5, :4]

A:

Short answer: 
If your version is later that 0.11.0, try setting your display width with:
pd.set_option('display.width', 200)

Long answer:
 Granted, the thread is 4 months old, but I was having this same problem last night. An ipython notebook that worked fine at my job would not present html tables at home. 
First, check your version:
import pandas as pd
pd.__version__ 

Mine comes back with: '0.11.0'
Next, check your settings with:  
pd.describe_option('display')

This will give you a long list of all possible display options and the current default values.
You may have to play with changing the defaults. Go with large values to get it working and then scale back as needed.
Display.width is the important one. I put these at the top with imports.
pd.set_option('display.height', 500)
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 200)

