Is there a way to default to “Replace in all cells” in the “Find and Replace” in jupyter?

后端 未结 4 862
滥情空心
滥情空心 2021-02-02 07:45

I usually want to find and replace all, but it looks like it has been set to current/highlighted cell only (https://github.com/jupyter/notebook/pull/2131). jupyter also doesn\'t

相关标签:
4条回答
  • 2021-02-02 08:21

    Press ctrl+shift+F. Then type "find and replace". In order to rename a variable in all cells, click on the arrow as shown in the image

    0 讨论(0)
  • 2021-02-02 08:30

    I just had to do it urgently so shut down the notebook kernel did it from the terminal with sed like this:

    sed -i "" 's/oldword/newword/g' mynotebook.ipynb
    

    That was on a mac which am using at the moment, but if you do it on ordinary linux the "" should be left out ie

    sed -i 's/oldword/newword/g' mynotebook.ipynb
    

    First time I ever needed to do such a thing in years but if it happened more often would be good if it could be done from the browser.

    0 讨论(0)
  • 2021-02-02 08:44

    Steps 1.Go to edit -> Find and Replace -> click on it

    See the highlighted option. Use this to replace in complete notebook.

    0 讨论(0)
  • 2021-02-02 08:48

    Select all the cells where you want to perform Find/Replace

    Shift + Arrow key Down or Up


    and then,

    Menu: Edit -> Find and Replace

    0 讨论(0)
提交回复
热议问题