26. GroupBy agg() function in PySpark | Azure Databricks

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 13

  • @kamalakant05
    @kamalakant05 2 роки тому +3

    Hi Maheer, you are doing great job. Salute. Thank you

  • @ananyanayak7509
    @ananyanayak7509 2 роки тому +1

    Great explanation Maheer. Can you please share the DDL of the dataframe in the description ? It will help all of us to practise.

  • @polakigowtam183
    @polakigowtam183 2 роки тому +1

    Good vedios Maheer. Thanks for the pyspark vedios.

  • @gvnreddy2244
    @gvnreddy2244 Рік тому

    how to Select multiple columns using group BY is it possible "using one agg to a column in DF to return that Full DF with all columns " ? please explain this scenario once

  • @vutv5742
    @vutv5742 8 місяців тому

    Completed 🎉🎉

  • @manu77564
    @manu77564 2 роки тому +1

    Thanks bhaii....

  • @shubhamwakshe9603
    @shubhamwakshe9603 10 місяців тому

    sir, i have one doubt..if we want name and id of that person who is having max or min salary after group by, how can we calculate it in pyspark

    • @Thulasisingala-ih1oz
      @Thulasisingala-ih1oz 9 місяців тому

      Did you get the answer

    • @shubhamwakshe9603
      @shubhamwakshe9603 9 місяців тому

      not yet@@Thulasisingala-ih1oz..

    • @livianshrawnia7715
      @livianshrawnia7715 5 днів тому

      you get the min or max salary in one DF and use the value of min or max salary and use join in diffrent DF for Eg: df1 = df.groupBy("department").agg(min("salary").alias("minSalary"),\
      max("salary").alias("maxSalary"))
      resultDf = df.join(df1, [df.salary == df1.maxSalary],"inner")
      resultDf.show()
      Hope that helps :)