简体   繁体   中英

Problem printing a CSV file with pandas in python

I have school project to submit by Sunday and I have a problem here , CSV file

import pandas as PD
DF=PD.read_csv('C:\New folder\Book4.csv')
print(DF)

This isn't the entire code but this part is the only issue. I have 4 CSV files in total and only this one is not printing the middle column for some reason. I had this issue before when I was trying to print second csv file but that just printed correctly after I added the third and fourth(this one) CSV file and this one got the problem
please help.

You probably have too many columns in this CSV. You can set the number of columns to print:

 pd.set_option('display.max_columns',40)

The above code will increase the maximum to 40 columns

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM