2

I'm getting a bit tired of running pd.options.display.max_columns = some_large_number for every new session.

Is there a way to save my preferences permanently?

Alex
  • 3,958
  • 4
  • 17
  • 24

1 Answers1

3

According to panda's documentation, you can create a startup file.
You can find examples on how to set up these startup files here (python) and here (ipython).

Basically make your startup.py like:

import pandas as pd
pd.set_option('display.max_columns', some_large_number)

And put it in ipython's profile_default or link it with the PYTHONSTARTUP variable for regular python.

jaumebonet
  • 2,096
  • 1
  • 15
  • 18