Skip to content

Commit

Permalink
Create path to save file
Browse files Browse the repository at this point in the history
  • Loading branch information
andremartins31 committed Nov 19, 2023
1 parent 991bfa6 commit 57d9e11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pipelines/rj_sms/whatsapp/clinica_scheduled_patients/tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import os
import csv
import shutil
import pandas as pd
Expand All @@ -22,6 +23,9 @@ def get_patients():

@task
def save_patients(dataframe):
path = 'pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data'
if not os.path.exists(path):
os.mkdir(path)
data_futura = datetime.today() + timedelta(days=3)
data_formatada = data_futura.strftime("%Y-%m-%d")
filename = f"pipelines/rj_sms/whatsapp/clinica_scheduled_patients/data/{data_formatada}.csv"
Expand Down

0 comments on commit 57d9e11

Please sign in to comment.