I have a csv file with data looking like (see below). I need help parsing datetime and fill missing date_time and assigning missing data as “M”(missing):
Datetime, Data
19920101 00:00,2
19920101 01:00,3
19920101 23:00,5
19920505 12:00,5
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not a complete answer but just tried to parse the date time string
Will this help in finding out the missing dates and times for you.
I could not understand what 3 is in the string
3 19920101 23:00.[Edit: based on your comment]
So in your code, you could try something like this (You will need to work and refine this)
[Edit: Code replaced]