pythonjupyter-notebook

What is the usage of tag over the cell in jupyter?


I found that, in jupyter notebook, there is a tag tool over the cell, which can be activated by "View - Cell Toolbar - Tags". But I can not figure out, why we need these tags. Can someone give some suggestions or usage examples?

enter image description here


Solution

  • Tagging is a fairly recent and perhaps not quite finished feature of jupyter-notebooks, added with version 5.0. From what I understand they are mostly meant for tools such as nbconvert (converts notebooks to other formats such as pdf) and nbval (validates notebooks) and other more or less integrated tools working with jupyter notebooks. Being able to add tags to a cell would enable different behaviours for such tools depending on a cells tag. Some example that could be accomplished with the ability to add tags would be:

    as envisaged by takluyver over at jupyter's github. If you want more information on implementation and the discussion surrounding it you can read more here.