You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this works in iPython and notebooks, but has a couple of problems for my use case:
It doesn't help for scripts run with $ python my_pandas_script.py because python obviously doesn't run the iPython startup stuff.
It leaves pandas in the globals() of the user's iPython session, which I don't want to do (I'm trying to set defaults for a multiuser environment, but I otherwise want things to feel as usual). I know I can add del pandas to that startup script and it will work (i.e. the option will be set correctly for the user if they import pandas), but ...
It just feels ugly (and import pandas is non-zero (but not trivial) startup overhead).
Patching the pandas library itself is not an option in this context (the user is free to upgrade it).
Do I have any other options? e.g. environment variables, dotfiles, etc., etc.?
The text was updated successfully, but these errors were encountered:
Does pandas provide a way to set its options without importing the module?
I've seen the advice to add something like this to the iPython startup:
this works in iPython and notebooks, but has a couple of problems for my use case:
$ python my_pandas_script.py
becausepython
obviously doesn't run the iPython startup stuff.pandas
in theglobals()
of the user's iPython session, which I don't want to do (I'm trying to set defaults for a multiuser environment, but I otherwise want things to feel as usual). I know I can adddel pandas
to that startup script and it will work (i.e. the option will be set correctly for the user if they import pandas), but ...import pandas
is non-zero (but not trivial) startup overhead).Patching the pandas library itself is not an option in this context (the user is free to upgrade it).
Do I have any other options? e.g. environment variables, dotfiles, etc., etc.?
The text was updated successfully, but these errors were encountered: