statsmodels-tutorial
statsmodels-tutorial copied to clipboard
All notebooks are missing imports
All the ipython notebooks won't run out of the box because imports are missing. Could you please add those?
See: https://github.com/jseabold/tutorial/blob/master/preliminaries.py#L18 for the import assumptions. If you prefer I can add them to every file, but I just keep them in a config file.
I guess most users like me just want to try out something, e.g. robust estimation. They don't know that they have to copy & paste imports from preliminaries.py.
So my suggestion would be to copy & paste the imports to each notebook or to make a file common_imports.py
that contains them and then in each notebook write from common_imports import *
. I like the first method better because then each notebook is really independent and I can e.g. just modify it and sent it to a fried to check out.
Sure this makes sense. Just seemed cumbersome during the tutorial to have everyone type the imports each time. Easier to just drop the common import assumptions into your IPython config for the notebook profile.
Is there a way to have an ipython config file in the tutorial directory that is automatically picked up? Another possibility would be to mention the imports / ipython config in a top-level README instead of in preliminaries which user's might miss (I did).