So, here we will create data preprocessing file using Spyder IDE. If you have problem on installing Anaconda, see the previous tutorial. To open Spyder, you can click the Windows Start button and select the Anaconda3 (64-bit), then Spyder. Or type "Spyder" on windows search menu. Click on it. The Spyder will look something like this:
Save as data_preprocessing_template.py. So, we created a new file in Python that we called data preprocessing template because we are starting to build our template. First step is importing the libraries.
What is a library?
A library is a tool that you can use to make specific job. You just have to give inputs and library will do the job then it will return some outputs. And we are going to mostly use libraries during this tutorials to make our machine learning models most efficient as possible.
Actually, we are going to use many libraries during this tutorials, but there are three essential libraries that we are going to use every time. The first step of data preprocessing is importing these three essential libraries.
- numpy
- matplotlib.pyplot
- pandas
How to write code:
numpy is a library that contains mathematical tools. Basically, this is the library that we need to include any types of mathematics in our code. Since, machine learning models are based on mathematics, we will absolutely need numpy.
matplotlib.pyplot is a library that is going to help us plot nice charts. It contains very intuitive and useful tools.
pandas is a library to import datasets and manage datasets. It contains very intuitive as well. We are going to spend most of the time to import our datasets and we will manage them.
To run the code, block all the code then press Ctrl + Enter
These are three essential libraries that we need. So, I look forward to seeing you in the next tutorial.
0 comments:
Post a Comment