Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб 08 Ads Performance в хорошем качестве

08 Ads Performance 9 дней назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



08 Ads Performance

🚀 PYSPARK Challenge - Day 8️⃣ 🌟PYSPARK Practice/Interview Problem 📊 --------------------------------------------- 🎯 PROBLEM STATEMENT --------------------------------------------- Ads Performance Write an pyspark program to find the ctr of each Ad.Round ctr to 2 decimal points. Order the result table by ctr in descending order and by ad_id in ascending order in case of a tie. Ctr=Clicked/(Clicked+Viewed) --------------------------------------------- 📝 Schema And Data : --------------------------------------------- Difficult Level : EASY Input Data : schema=StructType([ StructField('AD_ID',IntegerType(),True) ,StructField('USER_ID',IntegerType(),True) ,StructField('ACTION',StringType(),True) ]) data = [ (1, 1, 'Clicked'), (2, 2, 'Clicked'), (3, 3, 'Viewed'), (5, 5, 'Ignored'), (1, 7, 'Ignored'), (2, 7, 'Viewed'), (3, 5, 'Clicked'), (1, 4, 'Viewed'), (2, 11, 'Viewed'), (1, 2, 'Clicked') ] Key Concepts: 📚 What You'll Learn: ✅ Use groupBy(AD_ID) to group data by ad. ✅ Apply count() on Clicked and Viewed actions to calculate CTR. ✅ Round CTR to 2 decimal places using round(). ✅ Use orderBy() to sort results by CTR (descending) and AD_ID (ascending) in case of ties. ✅ Filter out Ignored actions to focus on relevant data. ✅ Efficiently aggregate and order data using PySpark DataFrame operations. #dataengineering #pyspark #bigdata #apachespark #learning #dataframes #joinoperations #codingchallenges #leetcode #education #programming #coding #interview

Comments