0

i am very new to pandas, i am using a standard emacs python mode.

I am expecting the first 5 rows, instead of a summary, does anyone knows why this is happenning?

>>> test.head()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 5 entries, 0 to 4
Data columns:
myname              5  non-null values
sid                 5  non-null values
age                 5  non-null values
country             5  non-null values
DOB                 5  non-null values
income              5  non-null values
height              5  non-null values
EdChum
  • 376,765
  • 198
  • 813
  • 562

2 Answers2

0

I think emacs mode is not related to your problem.

When a DataFrame's columns are too wide to fit across the screen, older versions of Pandas revert to displaying the summary instead. Recent updates to pandas (version 0.10 and above) show everything, wrapping whatever columns don't fit onto a second block.

I suggest upgrading. Otherwise this answer has some helpful ideas for working around this in older versions of Pandas: https://stackoverflow.com/a/11708664/1221924

Community
  • 1
  • 1
Dan Allan
  • 34,073
  • 6
  • 70
  • 63
0

You are probably using 0.6.x version, this one had a bug in emacs causing the behavior you have: https://github.com/pydata/pandas/pull/625. Workaround is suggested by Dan.

Wouter Overmeire
  • 65,766
  • 10
  • 63
  • 43