Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DennisLemes
Copy link
Contributor

No description provided.

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)
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants