Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def insert_floodlights():
- Workbook.caller()
- service = authenticate.authenticate_user()
- prof_id = authenticate.profile_id(service)
- tags = pd.DataFrame(Range('Create_Floodlights', 'A1').table.value,
- columns=Range('Create_Floodlights', 'A1').horizontal.value)
- tags.drop(0, inplace=True)
- tags['Secure'] = np.where(tags['Secure'] == 'Yes', 'True', 'False')
- j = 2
- for index, row in tags.iterrows():
- new_floodlight = {
- 'kind': 'dfareporting#floodlightActivity',
- 'countingMethod': 'STANDARD_COUNTING',
- 'sslRequired': row['Secure'],
- 'floodlightActivityGroupId': row['Floodlight Activity Group ID'],
- 'name': row['Floodlight Name'],
- 'expectedUrl': row['Expected URL']
- }
- service.floodlightActivities().insert(profileId=prof_id, body=new_floodlight).execute()
- Range('Create_Floodlights', 'E' + str(j)).value = 'Created'
- j += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement