-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepara tabela e agrupamento de minutos adicionados #34
base: master
Are you sure you want to change the base?
Conversation
Por enquanto funciona apenas para a tabela que estamos recebendo do RU, mas esse arquivo será modificado com o tempo para ser mais abrangente
No momento funcionando apenas para a tabela recebida do RU.
for x in range(df.shape[0]): | ||
if x%num == 0: | ||
row = df.iloc[x] | ||
tabela.append(row) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Você precisa criar uma nova tabela
? Não é suficiente só modificar df
?
tabela.drop([0],axis=0, inplace = True) | ||
tabela['hora'] = df['Datetime'].apply(lambda x: x.hour) | ||
tabela['minuto'] = df['Datetime'].apply(lambda x: x.minute) | ||
return tabela |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O que a gente quer aqui é o objeto de tipo datetime
, não os valores individuais de hora
e minuto
.
for j in range(0,num): | ||
soma += int(df.iloc[i-j,df.columns.get_loc('Num_pessoas')]) | ||
tabela.at[i,'Num_pessoas'] = soma | ||
return tabela |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.