Mtoto News Childline Kenya Call Volume Prediction Challenge
2000 Zindi Points
Help Kenya's child protection hotline forecast how many calls they will receive each hour each day
11 April–4 August 2019 23:59
191 data scientists enrolled, 38 on the leaderboard
Some help for a beginner.
published 18 May 2019, 18:42

Hello everyone, I'd like to know how do I convert the date column values to be formed in the way that it is seen in the sample submission CSV?

In the train.csv df['calldate'] is written as: 2016-01-01 07:26:47 but in the sample submission csv the same is represented as: 2016071300. How do I achieve this conversion?

Hi Tim you need to first parse the field as a date then using something like apply and lambda functions and datetime.strftime() convert it to desireable format example:

df['calldate'].apply(lambda x: datetime.strftime(x, "%Y%m%d%H%M%S")

This assumes you have already parsed the column as a datetime value/feature.

Visit this page to learn the different date formats: http://strftime.org/

Hi Tim,

You don't have to do any convertion unless your models use this kind of format! Keep the date format when training your model, and just set the "calls" column of the submission file and save it. This is what I did.

Thanks. This is the method I used.