deleted-U05QUSWUJA2
2025-01-09 23:53:06

@deleted-U07EH86AAN9 hey man I haven't been able to get to it with my family. Here is the previous code we got to work and a copy of a previous version. Take the outputted data dictionary and have it use the input_xl formula to iterate and input into each proper cell. Take a crack at it in the morning, I will join in when I can in the morning.

Ahsan (ahsan@shield-legal.com)
2025-01-09 23:53:27

Copy will do

deleted-U05QUSWUJA2
2025-01-09 23:53:41
deleted-U05QUSWUJA2
2025-01-09 23:53:57

Thank you, I owe you one

deleted-U05QUSWUJA2
2025-01-09 23:54:52

also make sure you are running on the updated info as of Monday which I believe is what Edward gave you and we overwrote

Ahsan (ahsan@shield-legal.com)
2025-01-09 23:55:18

Will do.

deleted-U05QUSWUJA2
2025-01-10 09:36:22

How’s it going?

Ahsan (ahsan@shield-legal.com)
2025-01-10 09:37:54

still working on it. Edward gets in around 8 so I will touch base with him when he is in.

deleted-U05QUSWUJA2
2025-01-10 09:39:28

stage = "First 30 Days" print(stage) stagedf = casedf.copy()

for col, values in cols.items():
  if col in date_col_list:
    base_date = ref_date - pd.Timedelta(days=values[0])
    print(f"Stage: {stage} base date is {base_date}")
    stage_df = stage_df[stage_df[col] >= base_date]
  else:
    stage_df =  stage_df[stage_df[col].isin(values)]

results_count = len(stage_df)
print(results_count)
stage_results[f"{stage}"] = {"stage_count": results_count, "stage_data": stage_df}
case_df = get_merged_case(stage_df, case_df)


stage = "No ID No Contact Post 30 Days"
print(stage)
stage_df = case_df.copy()
for col, values in cols.items():
  if col in date_col_list:
    base_date = ref_date - pd.Timedelta(days=values[0])
    base_120_date = ref_date - pd.Timedelta(days=120)
    print(f"Stage: {stage} base date is {base_date}")
    stage_df = stage_df[(stage_df[col] <= base_date) & (stage_df[col] >= base_120_date)]

  else:
    stage_df =  stage_df[stage_df[col].isin(values)]

results_count = len(stage_df)
print(results_count)
stage_results[f"{stage}"] = {"stage_count": results_count, "stage_data": stage_df}


stage = "No ID No Contact Post 120 Days"
print(stage)
stage_df = case_df.copy()
for col, values in cols.items():
  if col in date_col_list:
    base_date = ref_date - pd.Timedelta(days=values[0])
    print(f"Stage: {stage} base date is {base_date}")
    stage_df = stage_df[stage_df[col] <= base_date]

  else:
    stage_df =  stage_df[stage_df[col].isin(values)]

results_count = len(stage_df)
print(results_count)
stage_results[f"{stage}"] = {"stage_count": results_count, "stage_data": stage_df}
deleted-U05QUSWUJA2
2025-01-10 09:40:03

noticed we didn't finish the other stages. I added some adjustments to these.

deleted-U05QUSWUJA2
2025-01-10 09:40:39

let me know if youre able to get it working. I will be in as soon as I can

👍:skin_tone_4: Ahsan
deleted-U05QUSWUJA2
2025-01-10 10:46:24

Hey where are we at?

Ahsan (ahsan@shield-legal.com)
2025-01-10 10:47:20

running into a date time object issue when comparing the base date to ref date, think i fixed the bug, about to re run the code again

Ahsan (ahsan@shield-legal.com)
2025-01-10 10:47:24

update in 2 min

Ahsan (ahsan@shield-legal.com)
2025-01-10 10:52:10

still keep getting this type error

deleted-U05QUSWUJA2
2025-01-10 10:55:02

Cam and Flatirons are blowing me up. See if Dustin can help I’m on my way

Ahsan (ahsan@shield-legal.com)
2025-01-10 10:56:28

Dustin is not in yet, but will do.

deleted-U05QUSWUJA2
2025-01-10 11:00:25

Just keep cranking at it

Ahsan (ahsan@shield-legal.com)
2025-01-10 11:00:37

yup

deleted-U05QUSWUJA2
2025-01-10 17:23:01

Any progress?

Ahsan (ahsan@shield-legal.com)
2025-01-10 17:32:53

still getting same error for date str <= base

Ahsan (ahsan@shield-legal.com)
2025-01-10 17:33:13

going to go through with this with dustin in a sec

👍 deleted-U05QUSWUJA2
deleted-U05QUSWUJA2
2025-02-24 10:34:32

https://teams.microsoft.com/l/meetup-join/19:meetingNDQzMDY4ZjctNjY2OS00NWQ2LTkxMjItMWQ2NDEzZGIwODNl@thread.v2/0?context=%7B%22Tid%22:%22ab7d36772e094c36ba5d4d4f930505eb%22,%22Oid%22:%2228d5085b-b0de-4267-88f8-24c45db964cc%22%7D|https://teams.microsoft.com/l/meetup-join/19:meetingNDQzMDY4ZjctNjY2OS00NWQ2LTkxMjItM[…]%22,%22Oid%22:%2228d5085b-b0de-4267-88f8-24c45db964cc%22%7D

Microsoft Teams
Ahsan (ahsan@shield-legal.com)
2025-02-24 10:35:22

in