First time here? Check out the FAQ!

Ask Your Question
0

Is there any way to have a cell tell you how long it took to run in the Jupyter notebook?

asked 5 years ago

sum8tion gravatar image

The question is basically all in the title. I'm working on a project in the Jupyter and notebook, and I have some cells that have longer run times. Sometimes I let these run, and come back to check on them later, however it would be nice to know exactly what duration those cells ran for.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 5 years ago

updated 5 years ago

You can put %%time as a line at the start of the cell. Does that do what you want?

See also https://stackoverflow.com/questions/3... and https://nbviewer.jupyter.org/github/i...

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 592 times

Last updated: Jul 27 '19