Add a DataFrame.show() method pls! · Issue #1889 · pandas-dev/pandas (original) (raw)
'print df' will give something like below if the dataframe 'df' is big to fit into the screen :
<class 'pandas.core.frame.DataFrame'>
MultiIndex: 41955 entries, (u'000002', u'20061231') to (u'603366', u'20120630')
Columns: 147 entries, STK_ID to EPS
dtypes: float64(135), object(12)
But most of the time, I want to have a glimpse of the data , which help to know what happened to the dataframe.
Can Pandas developers add a 'show()' method to DataFrame object to display part of the data inside ? Namely, show the four corner (up_left, up_right, down_left, down_right) data, and use '...' to represent the omitted part ?
somewhat like :
STK_ID RPT_Date STK_Name .. OprCF_PS EPS
STK_ID RPT_Date
000002 20061231 000002 20061231 万科A .. -0.692 0.526
20070331 000002 20070331 万科A .. -0.741 0.140
20070630 000002 20070630 万科A .. -0.454 0.254
............... ............. ............... ........... ... .......... .....
20071231 000002 20071231 万科A .. -1.519 0.705
20080331 000002 20080331 万科A .. -0.207 0.105