Posts by AlexCiuffa • 2,402 points
102 posts
-
0
votes1
answer1539
viewsA: Group data by Month/Year
I made that code. I hope it helps. import pandas as pd #garanto que as colunas então com o type certo df['data_utilizacao'] = df['data_utilizacao'].astype('datetime64') df['quantidade_itens'] =…
-
2
votes1
answer2644
viewsA: Date calculation with Python
Yes, it is possible to do this with the datetime library and the strptime function, which turns a string into a date according to a format. from datetime import datetime def diferenca_dias(d1, d2):…