在Python/IPython环境中设置启动选项

Using startup scripts for the python/ipython environment to import pandas and set options makes working with pandas more efficient. To do this, create a .py or .ipy script in the startup directory of the desired profile. An example where the startup folder is in a default ipython profile can be found at:

  1. $IPYTHONDIR/profile_default/startup

More information can be found in the ipython documentation. An example startup script for pandas is displayed below:

  1. import pandas as pd
  2. pd.set_option('display.max_rows', 999)
  3. pd.set_option('precision', 5)