How to load/edit/run/save text files (.py) into an IPython notebook cell?

I’ve recently moved over to using IPython notebooks as part of my workflow. However, I’ve not been successful in finding a way to import .py files into the individual cells of an open IPython notebook so that they can edited, run and then saved. Can this be done? I’ve found this in the documentation which … Read more

Autoreload of modules in IPython [duplicate]

This question already has answers here: Reloading submodules in IPython (14 answers) Closed 5 years ago. Is there a way to have IPython automatically reload all changed code? Either before each line is executed in the shell or failing that when it is specifically requested to. I’m doing a lot of exploratory programming using IPython … Read more

Using both Python 2.x and Python 3.x in IPython Notebook

I use IPython notebooks and would like to be able to select to create a 2.x or 3.x python notebook in IPython. I initially had Anaconda. With Anaconda a global environment variable had to be changed to select what version of python you want and then IPython could be started. This is not what I … Read more

Progress indicator during pandas operations

I regularly perform pandas operations on data frames in excess of 15 million or so rows and I’d love to have access to a progress indicator for particular operations. Does a text based progress indicator for pandas split-apply-combine operations exist? For example, in something like: df_users.groupby([‘userID’, ‘requestDate’]).apply(feature_rollup) where feature_rollup is a somewhat involved function that … Read more

How can I display an image from a file in Jupyter Notebook?

I would like to use an IPython notebook as a way to interactively analyze some genome charts I am making with Biopython’s GenomeDiagram module. While there is extensive documentation on how to use matplotlib to get graphs inline in IPython notebook, GenomeDiagram uses the ReportLab toolkit which I don’t think is supported for inline graphing … Read more

Change IPython/Jupyter notebook working directory

When I open a Jupyter notebook (formerly IPython) it defaults to C:\Users\USERNAME. How can I change this so to another location? 31 Answers 31 jupyter notebook –help-all could be of help: –notebook-dir=<Unicode> (NotebookManager.notebook_dir) Default: u’/Users/me/ipynbs’ The directory to use for notebooks. For example: jupyter notebook –notebook-dir=/Users/yourname/folder1/folder2/ You can of course set it in your profiles … Read more