You can use Series.map()
function to do this:
your_dic = {
"https://sitename.com/": "mainscreen",
"https://sitename.com/about/news/": "news",
"https://sitename.com/?click_id=8YeZ1Ti4adZixjK&city=City": "city_selection",
"https://sitename.com//product/": "product_page"
}
df['start_event'] = df['start_url'].map(your_dic)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…