0

Problem

I have a CSV file which has 100 rows. I want to print them all with pandas module. But It only printing 10 rows. How can I print all of them?

Code

from pandas import *

cvs=read_csv('sample.csv')

print(cvs)

Output which I get

    Serial Number                   Company Name  ...         Description Leave
0   9788189999599                 TALES OF SHIVA  ...                mark     0
1   9780099578079      1Q84 THE COMPLETE TRILOGY  ...                Mark     0
2   9780198082897                       MY KUMAN  ...                Mark     0
3   9780007880331        THE GOD OF SMAAL THINGS  ...  4TH HARPER COLLINS     2
4   9780545060455               THE BLACK CIRCLE  ...  4TH HARPER COLLINS     0
..            ...                            ...  ...                 ...   ...
94  9788184821536  MORE STORIES FROM THE JATAKAS  ...                 ACK     0
95  9788184821543           MORE TALES OF BIRBAL  ...                 ACK     0
96  9788184821550         TALES FROM THE JATAKAS  ...                 ACK     0
97  9788184821567               RAMarkS OF MEWAR  ...                 ACK     0
98  9788184821574       THE SONS OF THE PANDAVAS  ...                 ACK     0

[99 rows x 5 columns]
[Finished in 5.6s]
1
  • Printing a dataframe, by default, only gives a summary Commented Dec 22, 2021 at 12:13

2 Answers 2

1

You can try this one

from pandas import *

cvs=read_csv('sample.csv')
pandas.set_option('display.max_rows', csv.shape[0]+1)

print(cvs)
Sign up to request clarification or add additional context in comments.

Comments

1

Set display.max_rows:

pd.set_option('display.max_rows', 500)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.