6

I have some very large IPython (1.0) notebooks, which I find very unhandy to work with. I want to split the large notebook into several smaller ones, each covering a specific part of my analysis. However, the notebooks need to share data and (unpickleable) objects. Now, I want these notebooks to connect to the same kernel. How do I do this? How can I change the kernel to which a notebook is connected? (And any ideas how to automate this step?)

I don't want to use the parallel computing mechanism (which would be a trivial solution), because it would add much code overhead in my case.

Moritz
  • 1,085
  • 1
  • 8
  • 20
  • 1
    At present, there's no way to connect a notebook to a different kernel than the one started for it. That's something we plan to work on. – Thomas K Sep 18 '13 at 23:42
  • However, it's possible to import and run cells from another notebook. That's what I'm doing right now as workaround. – Moritz Jan 08 '14 at 09:51
  • Does this answer your question? [Share data between IPython Notebooks](https://stackoverflow.com/questions/31621414/share-data-between-ipython-notebooks) – Scratte Nov 28 '20 at 00:12
  • Does this answer your question? [Share data between IPython Notebooks](https://stackoverflow.com/questions/31621414/share-data-between-ipython-notebooks) – bad_coder Nov 29 '20 at 01:01
  • https://stackoverflow.com/questions/31621414/share-data-between-ipython-notebooks indeed seems to be a (new) solution for this problem, indeed, which I did not try, however (since right now I don't work with notebooks anymore) - but thank you for pointing it out! – Moritz Nov 29 '20 at 09:37

1 Answers1

1

When I have a long noetbook, I create functions from my code, and hide it into python modules, which I then import in the notebook. So that I can have huge chunk of code hidden on the background, and my notebook smaller for handier manipulation.

Romain Jouin
  • 4,448
  • 3
  • 49
  • 79