datascience-sp14 icon indicating copy to clipboard operation
datascience-sp14 copied to clipboard

lab 2, future-proof-ness of solutions.

Open giulioungaretti opened this issue 11 years ago • 0 comments

 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))) 

giulioungaretti avatar Jun 19 '14 22:06 giulioungaretti