day 3 | consecutive days | pyspark scenario based interview questions and answers

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025
  • day 3
    consecutive days
    pyspark scenario based interview questions and answers
    Create DataFrame Code :
    ====================
    data = [
    (1, '2024-03-01'),
    (1, '2024-03-02'),
    (1, '2024-03-03'),
    (1, '2024-03-04'),
    (1, '2024-03-06'),
    (1, '2024-03-10'),
    (1, '2024-03-11'),
    (1, '2024-03-12'),
    (1, '2024-03-13'),
    (1, '2024-03-14'),
    (1, '2024-03-20'),
    (1, '2024-03-25'),
    (1, '2024-03-26'),
    (1, '2024-03-27'),
    (1, '2024-03-28'),
    (1, '2024-03-29'),
    (1, '2024-03-30'),
    (2, '2024-03-01'),
    (2, '2024-03-02'),
    (2, '2024-03-03'),
    (2, '2024-03-04'),
    (3, '2024-03-01'),
    (3, '2024-03-02'),
    (3, '2024-03-03'),
    (3, '2024-03-04'),
    (3, '2024-03-04'),
    (3, '2024-03-04'),
    (3, '2024-03-05'),
    (4, '2024-03-01'),
    (4, '2024-03-02'),
    (4, '2024-03-03'),
    (4, '2024-03-04'),
    (4, '2024-03-04')
    ]
    schema = "user_id int , login_date string"
    df = spark.createDataFrame(data = data , schema = schema)
    df.display()
    Let's connect on LinkedIn : / dhirajgupta141
    pyspark 30 days challenge : • pyspark 30 days challenge
    DSA In Python Interview Series : • dsa for data engineer ...
    PySpark Interview Series : • pyspark interview ques...
    Pandas Interview Series : • pandas interview quest...
    SQL Interview Series : • sql interview question...
    PySpark Installation and Setup : • Spark Installation | P...
    #interview #spark #pyspark

Комментарии • 8

  • @VikasChavan-v1c
    @VikasChavan-v1c 10 месяцев назад +1

    Great work brother, keep it up

  • @karthickraja1026
    @karthickraja1026 10 месяцев назад +1

    Amazing brother 💥 I learned lot from your channel. Keep rocking 💯

  • @punpompur
    @punpompur 3 месяца назад

    One good thing about this series is that you share the dataframes directly which makes it quite easy to start with coding directly. Quite helpful

  • @pradumanyadav493
    @pradumanyadav493 10 месяцев назад

    Excellent series sir , please don't stop it

  • @dhanushkumar7849
    @dhanushkumar7849 10 месяцев назад

    Very good explanation Man

  • @KapilKumar-hk9xk
    @KapilKumar-hk9xk 6 месяцев назад

    Amazing

  • @punpompur
    @punpompur 3 месяца назад

    Does it matter if we use row_number or dense_rank? I tried the code with row_number and the output matched the expected result