У нас вы можете посмотреть бесплатно Walmart PySpark Interview Question | Data Engineering | или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Check out our other courses here: https://www.geekcoders.co.in/s/store from pyspark.sql import SparkSession from pyspark.sql.types import StructType, StructField, IntegerType, StringType, FloatType Initialize Spark session spark = SparkSession.builder \ .appName("Create Datasets") \ .getOrCreate() Define the schema for transactions transaction_schema = StructType([ StructField("customer_id", IntegerType(), True), StructField("transaction_type", StringType(), True), StructField("transaction_amount", FloatType(), True) ]) Create the transactions DataFrame transactions_data = [ (1, "credit", 30.0), (1, "debit", 90.0), (2, "credit", 50.0), (3, "debit", 57.0), (2, "debit", 90.0) ] transactions_df = spark.createDataFrame(transactions_data, schema=transaction_schema) Show the transactions DataFrame transactions_df.show() Define the schema for amounts amount_schema = StructType([ StructField("customer_id", IntegerType(), True), StructField("current_amount", FloatType(), True) ]) Create the amounts DataFrame amounts_data = [ (1, 1000.0), (2, 2000.0), (3, 3000.0), (4, 4000.0) ] amounts_df = spark.createDataFrame(amounts_data, schema=amount_schema) Show the amounts DataFrame amounts_df.show() This series is for beginners and intermediate level candidates who wants to crack PySpark interviews Here is the link to the course : https://www.geekcoders.co.in/courses/... #data #walmart #dataengineering #kafka #python #sql #azuredatabrickswithpyspark #llm #pyspark #interviewquestions #interview #pysparkinterview #dataengineer #aws #databricks #python