Importing The Dataset.
Steps For Importing the Dataset When Working With Jupyter Notebook.
-
Save the Jupyter Notebook File in the folder containing the dataset.
-
Best library to import the data set is pandas.So we’re going to use pandas to import the data set.
Question ) How to import Dataset using pandas?
Code:
Question ) What to do after importing the Dataset?
After importing the dataset, we need to distinguish the matrix of features and the dependent variable vector.ie Divide the data in the independent variable matrix and the dependent vector.
Consider the dataset
Note:
- In the Dataset we have three independent features.
- Country
- Age.
- Salary .
- And One Dependent Variable.
- Purchased.
Question ) How to distinguish dataset into independent matrix and dependent vector?
Reference to more examples accessing data with pandas
- Note:
- Indexes in Python starts at zero.
Written on November 11, 2018