I am using Jupyter notebook and I have multiple loops, functions, and so on and each add one level of indentation. Sometimes I want to add a piece of code not to the last block but a few block/frame higher.
In the text editors like notebook++ there is a vertical line that determines the indentation level. Is there the same feature in Jupyter notebook?
Use the greater than sign (>) followed by a space, for example: > Text that will be indented when the Markdown is rendered. Any subsequent text is indented until the next carriage return.
Mentioned below are some of the common causes of an indentation error in Python: While coding you are using both the tab as well as space. While in theory both of them serve the same purpose, if used alternatively in a code, the interpreter gets confused between which alteration to use and thus returns an error.
I would really benefit from something like this, especially when the code block gets rather long. As far as I know, there is no such thing in Jupyter, unfortunately. I was told on GitHub that the Spyder release planned for Q4 2017 would have included this, but I haven't seen it so far (Q1 2018).
If you really need to run your code on Jupyter and want to check the indentation levels, I would suggest writing your code in yhat Rodeo, check the indentation levels, and then paste your code back to Jupyter.
This is a cumbersome workaround, but at the moment it is the best thing I know that would work.
EDIT
VS Code, the free Microsoft IDE, is a valid alternative to yhat Rodeo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With