Last active
November 9, 2020 02:37
-
-
Save peacing/ba9f16b446907e6b76cd932e3a9b4597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import requests | |
df = pd.read_csv('promos.csv') | |
for row in df.items(): | |
user_id = row['user_id'] | |
url = f'http://internal.services.com/promotions?user_id={user_id}' | |
r = requests.post(url) | |
if r.status_code != 200: | |
raise RunTimeError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment