datascience-sp14
datascience-sp14 copied to clipboard
lab 2, future-proof-ness of solutions.
half_hour_grouped = log_df.groupby(lambda row: pd.to_datetime(str(log_df['date'][row].hour) + ":" +
str((log_df['date'][row].minute / 30)*30)))
is really smart but maybe better to highlight the nature of the integer division,
half_hour_grouped = log_df.groupby(lambda row: pd.to_datetime(str(log_df['date'][row].hour) + ":" +
str((log_df['date'][row].minute // 30)*30)))