0

so i'm really not sure what's the best way to ago about this so hopefully someone does. The goal is to pull data based on a date but only for a specific week. for example let say I wanted to pull data for this week in the year (week 46 11/12/18-11/18/18). I need to do this for the previous 3 weeks so week45 , week 44 , and week 43. all starting on Monday and ending on the sunday. the way I have it now looks like this

    now = datetime.now()
    lastWeek = now - timedelta(days = 7)
    df_previousWeek = waferInfo[waferInfo.FILE_FINISH_TS > lastWeek]

problem with this is that it pull from the last week from that moment I want it to do it for that specific week. So if is Tuesday I want it only to pull the data from Monday and Tuesday .

I hope I explained what i'm looking for well

Jeff Pernia
  • 79
  • 1
  • 13

0 Answers0