As we observe, some of the attributes are not required as per the requirement of the project: ['instant','casual','registered','atemp','dteday']. These can be dropped.
Task 1: Define a variable columnsToDrop to store the columns to drop: ['instant','casual','registered','atemp','dteday']
Task 2: Please drop these columns using drop() function: instant, casual, registered, atemp, dteday and store the resulting dataframe in bikesData
columnsToDrop = ['instant','casual','registered','atemp','dteday']
bikesData = bikesData.drop(columnsToDrop,1)
Some of the numerical columns will have to be scaled: ['temp','hum','windspeed']
Task 3: Define a variable columnsToScale to store the columns to scale: ['temp','hum','windspeed']
Task 4: Scale these columns using StandardScaler() function.
bikesData[columnsToScale] = scaler.fit_transform(bikesData[columnsToScale])
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
Please login to comment
0 Comments
There is 1 new comment.