ipython notebook pandas max allowable columns
Question: I have a simple csv file with ten columns!

When I set the following option in the notebook and print my csv file (which
is in a pandas dataframe) it doesn't print all the columns from left to right,
it prints the first two, the next two underneath and so on.

I used this option, why isn't it working?

    
    
    pd.option_context("display.max_rows",1,"display.max_columns",100)
    

Even this doesn't seem to work:

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


Answer: I assume you want to display your data in the notebook than the following
options work fine for me (IPython 2.3):

    
    
    import pandas as pd
    from IPython.display import display
    data = pd.read_csv('yourdata.txt')
    

Either directly set the option

    
    
    pd.options.display.max_columns = None
    display(data)
    

Or, use the set_option method you showed actually works fine as well

    
    
    pd.set_option('display.max_columns', None)
    display(data)
    

If you don't want to set this options for the whole script use the context
manager

    
    
    with pd.option_context('display.max_columns', None):
        display(data)
    

If this doesn't help, you might give a minimal example to reproduce your
issue.

