quase
This commit is contained in:
@@ -38,8 +38,8 @@ def filtro_setembro_abril_estacao(dados, output_csv):
|
||||
def estacaochuvosa(dados, output_csv):
|
||||
print(dados)
|
||||
|
||||
with open('iniciofimestacao.csv', 'w') as file:
|
||||
cabecalho = ['estacao', 'inicio','final']
|
||||
with open(output_csv, 'w') as file:
|
||||
cabecalho = ['CODIGO', 'INICIO','FINAL']
|
||||
writer = csv.DictWriter(file, fieldnames=cabecalho,delimiter=';')
|
||||
writer.writeheader() # Escreve o cabeçalho
|
||||
|
||||
@@ -102,9 +102,9 @@ def estacaochuvosa(dados, output_csv):
|
||||
marcador_inicio=False
|
||||
#print ('ano final chuva:', ano_do_incio_chuva+1)
|
||||
# print ('estacao:', nome_estacao,'INCIO:', data_incio_chuva,'FINAL:', data_final_chuva )
|
||||
with open('iniciofimestacao.csv', 'a') as file:
|
||||
with open(output_csv, 'a') as file:
|
||||
writer = csv.DictWriter(file, fieldnames=cabecalho, delimiter=';')
|
||||
writer.writerow({'estacao':nome_estacao, 'inicio':data_incio_chuva,'final':data_final_chuva})
|
||||
writer.writerow({'CODIGO':nome_estacao, 'INICIO':data_incio_chuva.strftime('%Y-%m-%d'),'FINAL':data_final_chuva.strftime('%Y-%m-%d')})
|
||||
|
||||
|
||||
def processar_inicio_fim_estacao_chuvosa():
|
||||
|
||||
Reference in New Issue
Block a user