EDIT:
There was problem with pandas version, so for pandas 0.22 need change:
d=df.groupby('variable')['date_time'].agg(list).to_dict()
to:
d=df.groupby('variable')['date_time'].apply(list).to_dict()
CLICK HERE to find out more related problems solutions.