25

I am trying to output all columns of a data frame .

Here is the code below:

df_advertiser_activity_part_qa  = df_advertiser_activity_part.loc[(df_advertiser_activity_part['advertiser_id']==209988 )]
df_advertiser_activity_part_qa.sort(columns ='date_each_day_et')

df_advertiser_activity_part_qa

when I output the data frame not all columns gets displayed . This has 21 columns and between some columns there is just there dots "..." I am using ipython notebook . Is there a way by which this can be ignored.

dev.doc
  • 569
  • 3
  • 12
  • 18
sushmit
  • 4,369
  • 2
  • 35
  • 38

1 Answers1

59

try:

pandas.set_option('display.max_columns', None)

but depending how many columns you have this is not a good idea. The data is being abbreviated because you have too many columns to fit practically on the screen.

You might be better off saving to a .csv to inspect the data.

df.to_csv('myfile.csv')

or if you have lots of rows:

df.head(1000).to_csv('myfile.csv')
JAB
  • 12,401
  • 6
  • 45
  • 50