Merging Multiple DataFrames | Merging More Than Two DataFrames | Conditional Merge | Advance Level

Sdílet
Vložit
  • čas přidán 17. 10. 2022
  • Merging Multiple DataFrames | Merging More Than Two DataFrames | Conditional Merge | Merge with Where Condition | Sub Query
    This video is an advance level video about merging the dataframes, which doesn't just tells you how to merge multiple tables but also explains how you can do the conditional Merge useing .Query function just like we do sub queries in SQL.
    You may also like to watch -
    Basic Join & Merge - • Combining Pandas DataF...
    Append & Concatenate - • Combining Pandas DataF...
    Pandas Complete Tutorial - • Python Pandas Complete...
    Data Science Playlist - • Data Science
    Tags -
    Join,
    Merge,
    Merge on Multiple Columns,
    Merge on columns which are not named same
    You can download the script used in this video using -
    File Name - merging_multiple_dataframes.py
    URL - github.com/LEARNEREA/Python/t...
    You can download the files used in the video using -
    File Name - org_details.xlsx
    URL - github.com/LEARNEREA/Python/t...
    Hash Tags -
    #Python #Pandas #Merging #Joins #Learnerea #DataScience
  • Věda a technologie

Komentáře • 11

  • @user-nf7ww2et4m
    @user-nf7ww2et4m Před 6 dny

    Thank you for the great explanation,
    How would you implement a join condition different than equal, like for example ">=" or usign case in the join condition like we do in sql?
    Thanks

  • @alndr4u
    @alndr4u Před rokem +2

    Thank you sir 🙏🏻

  • @1979ligesh
    @1979ligesh Před rokem +1

    Thanks

    • @learnerea
      @learnerea  Před rokem

      Thank you very much, keep watching

  • @alphanelmas1662
    @alphanelmas1662 Před rokem +1

    What if we have couple of more dataframes that needs to be merge. Using .merge() every time would be tedious. Isn't there any other way to solve that issue

    • @learnerea
      @learnerea  Před rokem +1

      you can try these -
      Concatenation: If you have data frames with the same columns but different rows, you can use the pd.concat() function to concatenate them vertically. This function concatenates data frames along a particular axis and can be used to combine multiple data frames into a single data frame.
      Joining: If you have data frames with different columns but the same index or column names, you can use the df.join() function to join them horizontally. This function merges data frames based on their index or column names and can be used to combine data frames that share common keys.
      Appending: If you have data frames with the same columns and want to add more rows, you can use the df.append() function to append new rows to an existing data frame. This function appends rows to the end of the data frame and can be used to combine data frames that have the same structure.
      Merge with loop: If you have a list of data frames that you want to merge, you can use a loop to iterate through the list and merge each data frame with the previous one. This can be a more efficient way to merge multiple data frames than using .merge() every time.

    • @alphanelmas1662
      @alphanelmas1662 Před rokem

      Thanks for the reply :)

    • @Kngdmio
      @Kngdmio Před rokem

      @@learnerea I never thought of merging with a loop - that’s way better than .merge() forever

  • @vishvadeepmohanpandey129

    Can You make another video on Query Part which you have inserted

    • @learnerea
      @learnerea  Před rokem

      would you mind mentioning the timeframe where you see me inserting the queries..