BHDS banking project

Discussion in 'Big Data and Analytics' started by _30376, Dec 2, 2018.

  1. _30376

    _30376 Member

    Joined:
    Apr 26, 2018
    Messages:
    4
    Likes Received:
    0
    Can anyone help me , how to conclude the result for this question " Check if age matters in marketing subscription for deposit ".

    upload_2018-12-2_13-25-6.png
     

    Attached Files:

    #1
  2. Neha_Pandey

    Neha_Pandey Well-Known Member
    Simplilearn Support Alumni

    Joined:
    Jun 7, 2018
    Messages:
    76
    Likes Received:
    0
    Hi Learner,

    Please use the below command.
    Command- df1.groupBy("y").agg(avg($"age")).show

    The unit is not required for the output. I hope this helps.

    Regards,
    Neha Pandey
     
    #2
  3. _30376

    _30376 Member

    Joined:
    Apr 26, 2018
    Messages:
    4
    Likes Received:
    0
    Thank you Neha Pnadey. I did the same and got output in my initial query. is there any other query required for this question "" Check if age matters in marketing subscription for deposit ".".
    userdf.groupBy("y").agg(avg($"age")).show
     
    #3

Share This Page