2. Loading and Processing Data
Activity 2.01: Loading Tabular Data and Rescaling Numerical Fields with a MinMax Scaler
Solution:
- Open a new Jupyter notebook to implement this activity. Save the file asÂ
Activity2-01.ipnyb. - In a new Jupyter Notebook cell, import the pandas library, as follows:
import pandas as pd
- Create a new pandas DataFrame named
dfand read theBias_correction_ucl.csvfile into it. Examine whether your data is properly loaded by printing the resultant DataFrame:df = pd.read_csv('Bias_correction_ucl.csv')Note
Make sure you change the path (highlighted) to the CSV file based on its location on your system. If you're running the Jupyter notebook from the same directory where the CSV file is stored, you can run the preceding code without any modification.
- Drop the
datecolumn using thedropmethod. Since you're dropping the columns, pass1to theaxisargument andTrueto theinplaceargument:df.drop(&apos...