Question

need some help to finish a Pyhton script !

  • 19 June 2020
  • 3 replies
  • 142 views

Hi ! 

I created a first Python code to try to organise datas for a table. It works well so I am able to organize datas in the right order.

The pb is that I need to split this big table in sub tables grouped by the value DOSSIER and i don’t know how to do that !

If someone gets an idea ! 

Many thx

Francis

import datetime
dates_obj = []
for i in input_data['dates'].split(','):
dates_obj.append(datetime.datetime.strptime(i, "%d/%m/%Y").date())

event_list = list(zip(input_data['events'].split(','),input_data['dossiers'].split(','),dates_obj,input_data['descriptions'].split(','),input_data['qte'].split(','),input_data['avocats'].split(','),input_data['types'].split(',')))

sorted_events = sorted(event_list, key=lambda item: (item[1],item[2]))
out = []
for e in sorted_events:
out.append({'event': e[0],'dossier': e[1],'date': e[2].strftime("%d/%m/%Y"),'types': e[6],'description': e[3],'qte': e[4],'avocats': e[5]})
return {
"events": out,
}

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +8

Hi @Francis - Are you still having troubles with this? We created a ticket for you in Zapier Support but we had not heard back from you yet. Please let us know how we may help further!

I am sorry to ask but where can I find this ticket in my zapier account ? I found nothing in the Get Help menu :-(

Thks ! 

Userlevel 7
Badge +11

Hi @Francis!

It would just be in your email account. Our support team sent you a couple of emails. The person who responded was Daniel Frazier. Do you see anything when you search for that name?