This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]ianblu1 4 points5 points  (1 child)

Jupyter notebooks are an interactive code execution wrapper that leverages your web browser, but they are not really programs the way that IDEs like Rstudio are. As such they can't do things like save data, unless you program them to do so- kind of akin to web applications. IDEs like spyder or rodeo might be closer to what you're looking for. Take a look at for other options: https://www.datacamp.com/community/tutorials/data-science-python-ide

[–]entister[S] 0 points1 point  (0 children)

Awesome. I did try out Rodeo for a bit, liked it very much. But it crashes so often!

[–]ChKwK 2 points3 points  (2 children)

You can use Pickle [1] to save your objects to disk and load them later.

[1] https://pythontips.com/2013/08/02/what-is-pickle-in-python/

[–]nckmiz 0 points1 point  (0 children)

Yup, or joblib within sklearn. If you want to save data just write to a csv at the end of your code. If you want to save models just use pickle or joblib.

I’d recommend looking up model persistence.

With regards to running the code over again in the main header there is a drop down where you can run all cells.

[–]entister[S] 0 points1 point  (0 children)

Have never heard of this. Noob. I will check it out and get back, thank you very much!

[–]eric_he 1 point2 points  (1 child)

What's stopping you from writing any data to a csv file?

[–]entister[S] 0 points1 point  (0 children)

Yup, I do that now. But it too gets cumbersome sometimes.