Mastering PyCharm Transcripts
Chapter: Data science tools
Lecture: Concepts: Data science mode
0:01 We saw when working with libraries like NumPy
0:04 that are typically used in data science,
0:06 PyCharm detects this and suggests that it goes
0:09 into what is called scientific mode,
0:11 and in scientific mode, we have the couple of tool windows that rearrange themselves
0:16 and you can always get to this under the menu system
0:19 but it's nice that PyCharm suggests it.
0:22 Over here we have our main editor,
0:24 we have our code documentation and this really only worked
0:28 when you actually have the library fully installed,
0:31 remember we had a virtual environment,
0:33 NumPy was not installed, we had to use our code intention to install it,
0:35 then it started working, and then down at the bottom, we have this Python console.
0:41 Now notice, this is an IPython console here
0:44 and when I did the demo, for some reason, it was just a standard Python console,
0:49 I couldn't get the IPython console to come back,
0:52 I'm pretty sure the intention is always to be an interactive IPython console,
0:56 who knows, I'm not sure why it didn't come up for me
1:00 when I was doing the demo for you.
1:01 So, it's really nice that these tools come up like this
1:04 and when we write our code, we'll see that we have another area called the SciView,
1:10 so we have the documentation, but we also have this SciView.
1:14 Now, any sort of graph that is going to be shown will appear here,
1:19 when you run it, whether you're debugging or you're not debugging,
1:23 so we saw that when we call plot.show
1:25 normally that's a separate window per plot that just pops up
1:29 but if you do it inside PyCharm in this data science mode
1:33 it will actually just here in this SciView over here, so that's pretty cool.
1:38 Now if we actually debug it and stop here in a break point, we get some more options,
1:44 so if you look down here at the bottom in the variables, in the debugger
1:48 the things that are certain types of data science
1:52 variables like nd arrays from NumPy actually have this view as array,
1:57 so if you click on the view as array, over here on the right
2:01 you'll see you have this nice visualization.
2:03 Now this is not super exciting because it's one dimensional
2:06 but it could be two dimensional or more over here on the right,
2:11 so it's pretty cool that this option is available while you're debugging as well.