reduce output when printing indices and columns in pandas data frame and series

I often work with pandas using big dataframes and series with multi-index or multi-column and I use the EMACS shell.   

Often when I write `df.index` the output is so big that almost make my computer crash (and it is a powerful pc).   

As when you output a dataframe `df` the output is truncated to the first and last `n` columns, also indices and columns should  be truncated when printed to screen. 

