I am trying to convert a Jupyter notebook to a python file using nbconvert command. There is a cell having Python code which I want it to skip while converting. I tried few solutions including adding remove_cell tag to the one that has to be skipped:
"jupyter nbconvert <notebook_path> --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags=\"['remove_cell']\" --to script
But it did not work. Please let me know if this can be done through nbconvert.
The question needs a somewhat better specification (what is the output you get, in the script and on screen; code fragments; etc).
Even so, a few things you may try:
Using --to python
instead of --to script
(see this, although it may be old for your version).
Change delimiters for the tag.
In an example in the link above: --TagRemovePreprocessor.remove_cell_tags='{"note"}'
.
In this other example: --TagRemovePreprocessor.remove_cell_tags={\"Hide\"}
And some more.