(Optional) Using VS Code with Python
You can use VS Code with Python.
Install the Python extension.
With the Extension installed, once you open your first python file, you will be
prompted to install pylint Linter.
VS Code opens a terminal and runs the code needed to install the linter. It's important to note that this is a remote terminal, running on an engine in Cloudera Machine Learning. It's the same as if you launched a terminal inside a running workbench.
If you want to run arbitrary Python code inside VS Code, open a Python file, select
some code, right click, and select Run Selection/Line in Python
You can also just hit Shift-Enter in the code editor window. This will open up a new terminal if there isn’t one and run the selected code. Since this is a remote session, you can run pyspark directly inside VS Code.For more complex code requirements, you can also use the Python Debugging feature in VS Code.