Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9180653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:06:32+00:00 2026-06-17T18:06:32+00:00

This is likely very simple but I can’t figure out what’s wrong. I am

  • 0

This is likely very simple but I can’t figure out what’s wrong.
I am having trouble listing elements of a DataFrame. Sometimes the elements of a DataFrame are listed and sometimes it’s simply a description of the number and types of the data columns.
I know that the number of rows is a factor but even when I have only a few rows, I only get the description back.
For example:
If I have a DataFrame called ‘allpledges’, it gives me a description

In [5]:

allpledges

Out[5]:

<class 'pandas.core.frame.DataFrame'>
Int64Index: 305384 entries, 0 to 305383
Data columns:
Pledge#       305384  non-null values
Source        305384  non-null values
Date          305384  non-null values
Break         305384  non-null values
Progcode      237002  non-null values

Which is understandable because it’s too many rows to display.
But when I try to view a few, it still gives me the same thing

In [13]:

allpledges[:5]

Out[13]:

<class 'pandas.core.frame.DataFrame'>
Int64Index: 5 entries, 0 to 4
Data columns:
Pledge#       5  non-null values
Source        5  non-null values
Date          5  non-null values
Break         5  non-null values
Progcode      0  non-null values

When what I wanted was the top five rows listed out. I have seen this done in tutorials, but can’t figure out what I am doing wrong here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:06:32+00:00Added an answer on June 17, 2026 at 6:06 pm

    These settings are controlled in the options (I suspect you’re looking for max_rows or max_columns, but there are many options seen in the set_options docstring):

    In [11]: pd.options.display.max_columns
    Out[11]: 20
    

    And change them using set_option:

    In [12]: pd.set_option('display.max_columns', 10)
    

    If the DataFrame either has more columns or more rows than these settings it will abbreviate.

    For example:

    In [17]: df = pd.DataFrame(pd.np.arange(10).reshape(5,2))
    
    In [18]: pd.set_option('display.max_rows', 4)
    
    In [19]: df
    Out[19]: 
    <class 'pandas.core.frame.DataFrame'>
    Int64Index: 5 entries, 0 to 4
    Data columns:
    0    5  non-null values
    1    5  non-null values
    dtypes: int64(2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So this is most likely a very simple problem which i just can't figure
I've been stuck on this likely very simple problem, but haven't gotten anywhere with
Ok so this is likely a ridiculously stupid question but I can't seem to
This is more than likely a very simple question. I have an external javascript
Sorry for what is most likely a very 'newbie' question, but I'm having a
I realize this question is very likely to have been asked before, but I've
This very likely a setup issue on my part. I am trying to run
I feel bad because it is very likely this has already been answered and
Since in log4j javadoc is WARNING: This version of JDBCAppender is very likely to
This likely applies to non MVC too. But, Is it possible to use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.