0

I have a folder that lives within a sharepoint drive url. I wish to automatically extract a certain file, df, within this folder and import this file using Python.

Desired Result:

To schedule a 'job' that imports this file, df, into python so that I can do some 'transformations' to it.

This is what I am doing:

import os
import schedule
import shutil
import time
import pandas


def job():
     source_folder = r'https.sharepoint.com/sites/project/File.csv'  

     df = read_csv('source_folder')
     
     for value in df:
         ....do some work...
     




schedule.every().day.at("20:00").do(job)

while 1:
schedule.run_pending()
time.sleep(1)

Any suggestions will be helpful

Lynn
  • 2,193
  • 9
  • 14
  • I might want to implement something similar. What specific issue are you facing? What part of your code are you struggling with and what is the error message? – David Erickson Oct 20 '20 at 18:15
  • 1
    As far as I understand, your issue is the scheduling of the job, right? Have you already considered running your script with a 'cronjob' ? – WurzelseppQX Oct 20 '20 at 18:23
  • yes- let me look into this @WurzelseppQX - I will do more research on this 'cronjob' – Lynn Oct 20 '20 at 18:24
  • 1
    In case you are working on windows, this may be helpful: https://stackoverflow.com/questions/132971/what-is-the-windows-version-of-cron – WurzelseppQX Oct 20 '20 at 18:25

0 Answers0