Hey,buddies.I dont really get what is required of us from this task..I created my own target column in the train dataset and try predicting that..But clearly,I can see that i was doing the wrong thing..What is our target here?
Yes, you are required to generate your own target. Use groupby function on the ride_id column and aggegate by count or alternatively, copy this code below. it should generate the label for you.
ride_id_dict = {}
for ride_id in df["ride_id"]:
ifnot ride_id in ride_id_dict:
ride_id_dict[ride_id] = 1
else:
ride_id_dict[ride_id] += 1
@Acalo this has no effect of my df. Was it supposed to create a new column in my train_df ?
Yes, it creates a target column on your dataframe (df). Make sure you rename df to train_df on your dataframe.