Adding new columns to a Dataframe by comparing another Dataframe in PySpark | Realtime Scenario

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 27

  • @sravankumar1767
    @sravankumar1767 2 ปีที่แล้ว +1

    Nice explanation sravana 👌 👍 👏

  • @ahamadp6615
    @ahamadp6615 2 ปีที่แล้ว +2

    Another approach is unionByName() to above query.
    Correct me if I am wrong MAM

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว

      If the requirement is to have data from both the dataframes then we can use UnionByName.. but here the requirement is to check if the columns are matching with other dataframe and if any column is missing then it will create a column with same name and null value.

  • @praneethchiluka9602
    @praneethchiluka9602 2 ปีที่แล้ว +1

    could you do one video on project end-to-end pipeline.
    Like how we are using github, jenkins, etc into project. what is the process in project.

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว

      I can explain the overall procedure.. I may not be able to execute and show because I don't have required setup in my personal laptop.

    • @praneethchiluka9602
      @praneethchiluka9602 2 ปีที่แล้ว +1

      @@sravanalakshmipisupati6533 Yes please explain the overall procedure. like what tools are using (Github, jenkins, jira, etc) in the project with flow. actually there is no proper video which will explain project end to end process. so it will be great if you do one ?

    • @praneethchiluka9602
      @praneethchiluka9602 2 ปีที่แล้ว +1

      @@sravanalakshmipisupati6533 Hi, please make this in your checklist.

  • @srinivasasameer9615
    @srinivasasameer9615 2 ปีที่แล้ว +1

    Will you provide Scala code for this example if you are aware of it.

  • @ankitagawande9028
    @ankitagawande9028 ปีที่แล้ว

    Hi give me solution if i have table with name , id ,departmnet in name column 2 name . now the condition is want new column but in that new column i want all nam which are in name column

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  ปีที่แล้ว

      Use withColumn and use the name column, it will copy the contents from name to new column.
      Df.withColumn("new_col", f.col("name"))

  • @jeffersonerick4081
    @jeffersonerick4081 2 ปีที่แล้ว +1

    I have the same scenario. I have 2 dataframes with different number of columns. The second dataframe have an update values so i want to update the dataframe 1 considering the values of the second dataframe but keeping the values of the first dataframe if there is no a change.
    Could you help with this?

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว +1

      Hi Jefferson, Please join the 2 dataframes and select the updated columns from 2nd dataframe.

  • @nitika2649
    @nitika2649 2 ปีที่แล้ว

    amazing 👏

  • @Learn2Share786
    @Learn2Share786 2 ปีที่แล้ว +1

    Nicely explained, could you pls share the gihub link for this notebook, will help in practicing.

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว

      Thank you. Please check the description for GitHub links for code.

    • @Learn2Share786
      @Learn2Share786 2 ปีที่แล้ว

      @@sravanalakshmipisupati6533 thanks..under "sampledata" branch, looks this specific notebook is not checked in yet, could you commit the same? Or pls help me locate the file if it's checked in with some other name..

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว

      @@Learn2Share786 github.com/sravanapisupati/SampleDataSet/blob/main/weatherHistory.csv please open this link and click on the code hyperlink.

  • @avirubin613
    @avirubin613 ปีที่แล้ว +1

    Why can't you just do an inner join?

  • @GurudasKundukar
    @GurudasKundukar ปีที่แล้ว

    i have 3 dataframes one with 15 columns and 2 with one col each i want to add them make them as one dataframe .

  • @zouaghinadhem7870
    @zouaghinadhem7870 2 ปีที่แล้ว +1

    hi can you help me?

    • @sravanalakshmipisupati6533
      @sravanalakshmipisupati6533  2 ปีที่แล้ว

      Sure, please share your problem statement to my gmail sravana.pisupati@gmail.com

  • @kirangande1468
    @kirangande1468 2 ปีที่แล้ว +1

    Scala code for same plz