Primary competition visual

TotalEnergies rEVolution Hackathon

Helping Uganda
Qualifier
Challenge completed ~2 years ago
Prediction
401 joined
126 active
Starti
Jul 25, 23
Closei
Aug 25, 23
Reveali
Aug 25, 23
User avatar
cephars
Free Lance
PROBLEM STATEMENT
Help · 4 Aug 2023, 11:40 · 3

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?

Discussion 3 answers
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"]:
    if not ride_id in ride_id_dict:
        ride_id_dict[ride_id] = 1
    else:
        ride_id_dict[ride_id] += 1
4 Aug 2023, 12:05
Upvotes 0

@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.