Find out the head count of employee in each job | Data Engineering Interview | TigerAnalytics

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

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

  • @tanmaykapil5362
    @tanmaykapil5362 Месяц назад

    bro also attach csv file in the description it will be better we can prac. although u r doing great job

    • @CognitiveCoders
      @CognitiveCoders  Месяц назад

      Please get the dataset from telegram channel

  • @RajendraPrasad-qc3cy
    @RajendraPrasad-qc3cy Год назад

    Hi Pritam, i'm new subscriber to your channel and your videos are greatful for us. A request from my end is, please provide the datasets and datafrme create statement scripts in description

    • @CognitiveCoders
      @CognitiveCoders  Год назад

      From telegram channel you will get all the data files.

  • @vighneshbuddhivant8353
    @vighneshbuddhivant8353 5 месяцев назад

    df=spark.read.csv("/content/jobs.csv",header=True)
    df.show()
    result=df.groupBy('job').agg(count('name').alias('total_count'))
    result.show()
    rows=result.rdd.collect()
    result_dict = dict((row['job'], row['total_count']) for row in rows)
    print(result_dict)