Convert datetime string to new columns of Day, Month, Year in pandas data frame
I am new to python and have a pretty simple (hopefully straightforward!) question. Say that I have a data frame with 3 columns: time (which is in the format YYYY-MM-DDTHH:MM:SSZ), device_id, and rain but I need the first column, "time", to become three columns of "day", "month", and "year" with values from the timestamp. So the original data frame looks something like this: time device_id rain 2016-12-27T00:00:00Z 9b839362-b06d-4217-96f5-f261c1ada8d6 NaN 2016-12-28T00:00:00Z 9b839362-b06d-4217-96f5-f261c1ada8d6 0.2 2016-12-29T00:00:00Z 9b839362-b06d-4217-96f5-f261c1ada8d6 NaN 2016-12-30T00:00