Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Getting NA values while converting a variable into Date and Time format

$
0
0

@harry wrote:

I am currently solving the one-time series question of Analytics Vidhya hackathon in which there are two variable one is Datetime and other is count.I am currently trying to convert the Datetime variable into date format by which R can understand it but I am getting NA.

mvt = read.csv("train_unicorn.csv", stringsAsFactors=FALSE)
 mvt$Datetime = strptime(mvt$Datetime, format="%d-%m-%y %H:%M")
str(mvt)
'data.frame':	18288 obs. of  2 variables:
 $ Datetime: POSIXlt, format: NA NA ...
 $ Count   : int  8 2 6 2 2 2 2 2 6 2 ...

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles