Chapter 16 : End to End Project - Bikes Assessment - Basic - Divide into training/ test dataset


#1

from sklearn.model_selection import train_test_split
train_set,test_set=train_test_split(bikesData.copy(),test_size=0.3,random_state=42)
train_set.sort_values(‘dayCount’, axis= 0, inplace=True)
test_set.sort_values(‘dayCount’, axis= 0, inplace=True)
print(len(train_set), “train +”, len(test_set), “test”)

On submitting the system says “train_test_split function not imported”.


#2

I can see that in your first line you have import it. Did you execute it?


#3

yes and it is returning length of both test and train test