Commit 94a4223f authored by 张彦钊's avatar 张彦钊

add print for test

parent 7811f58f
......@@ -26,9 +26,11 @@ def fetch_user_profile(device_id):
sql = "select device_id,city_id from data_feed_click where device_id = '{0}' limit 1".format(device_id)
user_profile = con_sql(sql)
if user_profile.empty:
print("没有获取到该用户对应的city_id")
return {}, user_profile.empty
user_profile = user_profile.rename(columns={0:"device_id",1:"city_id"})
print("成功获取该用户对应的city_id")
user_profile_dict = {}
for i in user_profile.columns:
user_profile_dict[i] = user_profile.loc[0, i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment