I recently changed from Spyder
to PyCharm
as a Python IDE. In Spyder
I have often used the variable explorer feature (see picture). Is
If you want to inspect variables that contain arrays or datasets, like Spyder and see them as a nice table, you can do bellow :
1- Put a breakpoint after the variable that you like to inspect ( in my case, it's dataset
) :
2- Run the debugger ( the little bug on the top-right side of pyCharm).
The debugger will then stop on the line and you'll see something like below in your debugger window at the bottom of the pyCharm.
3- Right click on the variable and select View As DataFrame
4- You then will be presented by a nice table like below :
If you want to view the complete dataset or an array do this:
PyCharm has SciView for exploring variables in almost exactly the same manner as Spyder. Simply execute the selection or cell in console, then click View as Array in the Special Variable pane. Special Variable Pane
For your second question: you can also select your code and press shift + alt + E
to run a part of your script on to the python console
Step 1. Make a breakpoint by pressing on the right of the line numbers. Step 2. Click the debug button or right click then debug Step 3. Press the button above the settings button in the console to view the variables Step 4. Double click the variable of what you want to check the values. You can also right click that particular variable and view it as a dataframe.