Replace Excel Vlookup with Python - Five Minute Python Scripts

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

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

  • @GirayhanYlmaz
    @GirayhanYlmaz 4 года назад +3

    I’ve been using excel for over 20 years now, more than half in professional life. I’ve been trying to automate stuff and decided on pursuing python for that reason. Thank you for sharing your experience and wisdom with us.

  • @Humito124
    @Humito124 5 лет назад +51

    Just started to learn python on my free time. As an accountant your channel is very helpful since you give examples of how I can use python to analyze data. Keep up the good work

    • @studywithrobin2715
      @studywithrobin2715 3 года назад

      Former accountant turned web developer here! Derrick's awesome.

    • @ntenzz1808
      @ntenzz1808 3 года назад +1

      @@studywithrobin2715 existing accountant who learn Python for data analytics here. Agree to the awesomeness

    • @mxrvxn08
      @mxrvxn08 3 года назад

      if im working with large file, wilusing python be faster than the excel built in function or vba? thank u

  • @urielronaldo196
    @urielronaldo196 4 года назад +1

    This channel should have +1M subscribers. I am an economist from Mexico City and Derrick is my inspiration for keeping learning Python!

  • @logannon
    @logannon 3 года назад

    Been searching the world wide web for 4 hours on how to do this, and this is the only video that correct depicts what I needed. Thank you so fucking much!

  • @GlowingCrystalGirl
    @GlowingCrystalGirl 4 года назад +2

    Thankyou, finally found some decent content with someone who can speak english clearly. You are a saviour!

  • @PM-cs6jq
    @PM-cs6jq 2 года назад

    My friend, What a nice person you are and a great teacher 👏👏👏

  • @abrammakgalemele3491
    @abrammakgalemele3491 4 года назад +2

    Tx Derrick. To SQL users, that's a LEFT JOIN.

  • @JennHayden
    @JennHayden 5 лет назад +36

    Multiple people accessing the same spreadsheet. Reduce human error. story of my life.

  • @tortilladmaiz
    @tortilladmaiz 4 года назад +1

    you deserve more views i believe that this is the future im from tijuana and all the time is consumed by making reports documents on excel thank you sir

  • @codingwannabe
    @codingwannabe 4 года назад

    Dude I don't usually comment on google videos however I feel inclined to tell you how useful your content is. I've watched some of your stuff and as someone new to Python that's transitioning from excel your help has been immeasurable. Thanks and keep it coming!

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

    This video was so quick I didn't have time to thank you 👍

  • @Guilopes99
    @Guilopes99 4 года назад +9

    Thanks!
    As a python newbie and advanced Excel user, I struggle to learn Python as I'm very stuck to excel logic. Would be great to have a tutorial that shows how to do most of Excel data wrangling but better and quicker with python! Thanks!

  • @vio-noob_6737
    @vio-noob_6737 5 лет назад +25

    This channel is criminally under subscribed. Very very helpful!!

  • @soeaung1984
    @soeaung1984 4 года назад

    Excel Sumifs function from different Sheet. Thank you very much, Mr. Derrick.

  • @nkimomoleleki3716
    @nkimomoleleki3716 5 лет назад +1

    After watching this video I felt compelled to subscribe. A very good video, easy to follow and most importantly very helpful. Thanks man!

  • @virendraupadhye150
    @virendraupadhye150 2 года назад

    Just started to learn Python. Thanks very good explanation

  • @samijuju9728
    @samijuju9728 3 года назад

    Tanks Derrick i’m fan of your work 👍

  • @gabrielreilly7010
    @gabrielreilly7010 4 года назад

    I really like your videos. They answer practical questions the basic tutorials don't cover.

  • @patrickwheeler7107
    @patrickwheeler7107 3 года назад

    I love how you can go across data sources.

  • @sekar887
    @sekar887 2 года назад

    Super thanks for sharing the code in description

  • @Itshimaru
    @Itshimaru 4 года назад +5

    Dude, you're just as awesome! The things you have shared are invaluable to people like me who are just beginning to learn Python. By far, your tutorial is best out there with all the actual real life applications. Thank you

  • @blaskowitzj
    @blaskowitzj 4 года назад

    This is a huge help! Excel is so processing heavy that python makes things so much easier. Really appreciate your videos and please keep up the good work.

  • @SS-cn2td
    @SS-cn2td 3 года назад

    Derrick, this is really helpful, it's my daily work job to find out such cases, till now I was using index match. But now I will do with the method u showed here. Thanks.

  • @charitykahuria2892
    @charitykahuria2892 4 года назад +6

    I found this at a time when I was almost giving up...Thank you

  • @Bubbles-qh7ez
    @Bubbles-qh7ez 4 года назад +1

    your videos ae so good. This and your other excel videos ae just what I needed!

  • @rhettsmedia
    @rhettsmedia 4 года назад

    Thank you very clear very concise very good I will watch every video you make

  • @zma314125
    @zma314125 3 года назад

    Thank you, Derrick!

  • @tejaspawar3233
    @tejaspawar3233 3 года назад

    Hi Derrick
    Your explanation style and codes are simple and coo😎😎l gone through many videos on RUclips but none were practical and simple thanks bro keep it !!!👍👍👍
    Have become your fan by just one vedio will explore all your content thanks again 🎉🎉🎉

  • @SalehGoodarzian
    @SalehGoodarzian 2 года назад

    Very good exercise, thanks for this great video. I appreciate and wish you the best

  • @357qw
    @357qw 4 года назад

    Very very well explained. Thanks a lot Brother. I count on your channel here after :)

  • @sezerc.4355
    @sezerc.4355 Год назад +1

    URGENT!
    How can I reach the excel files that you have used?

  • @gpozzi.
    @gpozzi. 5 лет назад +1

    Derrick, your channel is a real gem! Please keep up the good work! You just gained a new sub

  • @redfeather22sa
    @redfeather22sa 4 года назад

    I know this is super useful content !! Derrick I can't thank you enough !!!

  • @kenifk1446
    @kenifk1446 4 года назад

    Superb bro. Keep doing more videos like this😎

  • @no0gon
    @no0gon 4 года назад

    i always use kind this vlookup in SAS, like left join and now i can do this thing with python. thank your guide again sensei

  • @drezim2001
    @drezim2001 4 года назад

    I look forward to more of your videos. I have screwed up some many formulas in excel.

  • @douglaskwesie5697
    @douglaskwesie5697 5 лет назад

    @Derrick Sherrill, u are the man!

  • @catalinim4227
    @catalinim4227 5 лет назад

    thanks for this, widens the solutions range... a faster formula is index+lookup, to eliminate human errors we can use macros. I know xlsx can't have macros but we can quickly write one in the personal macros and use it on any tybe of wb

  • @dieguin311
    @dieguin311 3 года назад

    Thanks dude.
    This really help me.
    Saludos!

  • @jyaragon
    @jyaragon 4 года назад

    Thanks. Very informative, quick and easy tutorial 👌. I’ve been spending lots of times trying to figure out how to do it in python until I came across your channel.

  • @lshankar83
    @lshankar83 5 лет назад +1

    Hi Derrick, the common assumption which everyone makes is that, they assume we always work on a new excel file and the merged data we put it in last columns.. But i have an old excel file and from which i need information from a specific column. Using the vlookup its easy but python merge (the one you described) i get the entire data from the old file.. here are the steps
    1. two files : old.xlsx which has 10 columns and column 3 is having sales data & the new.xlsx where i need bring in the last month sales in a newly inserted column.
    2.need only only column data from old.xlsx to the new file. lets say, the location key is common and last month sales
    not sure if the above describes the requirement well.. not sure how inner join, outerjoin helps but dont understand them

  • @fernandor4340
    @fernandor4340 4 года назад

    Pretty good video, as a begginer I could see some useful functions well explained.

  • @merryjoy48
    @merryjoy48 5 лет назад +1

    Hope you do more of the videos on python. Your videos have been really helpful to me (a beginner).

  • @minevr5839
    @minevr5839 5 лет назад

    Learning Python right now. Keep up the great work. I like your channel.

  • @lxlx19
    @lxlx19 4 года назад

    You save me! tks....greetings from Brazil

  • @Perspicacious_pi
    @Perspicacious_pi 4 года назад

    great content very concise

  • @ryanrumsey2830
    @ryanrumsey2830 3 года назад

    Hello Derrick .. I have learned so much from watching your videos.
    Do you do any one on one training or a little Q&A ?

  • @vwwvwwwvwwwvwwvvwwvw
    @vwwvwwwvwwwvwwvvwwvw 4 года назад

    @Derrik Not sure why you made the distinction between a key column and a target column. Is that important? Wouldn't df_info[['ID', 'IDs']] work the same in pd.merge? The essential thing here is what we're joining on wihch the column 'IDs'

  • @ssam7195
    @ssam7195 4 года назад

    Thanks Derrick 👍. Today I'm going to try this excercise in one of my regular task.

  • @vivekkaranath7706
    @vivekkaranath7706 4 года назад

    excellent video..really helpful

  • @dvsrkumar13
    @dvsrkumar13 5 лет назад +19

    Hi Derrik,
    This was a nice video.
    Could you please make a video on how to compare two excel files and highlight the differences in a third excel file?
    Could you please help. :)

  • @edileimoura
    @edileimoura 4 года назад

    Thanks for sharing. Congratulations on your talent

  • @expresstutorial3255
    @expresstutorial3255 3 года назад

    you area amazing bro!!!!

  • @vikassharma071107
    @vikassharma071107 4 года назад

    Very helpful. Thanks for this.

  • @granand
    @granand 4 года назад

    Thank you ..can I color code the differences in columns of excel

  • @schummy3000
    @schummy3000 4 года назад

    you make me decide to learn Phyton !

  • @adipai
    @adipai 4 года назад

    Very Helpful !!

  • @saqibrauf2191
    @saqibrauf2191 5 лет назад +1

    Thanks alot Derrick, you are the best.❤❤

  • @曾文東-x5d
    @曾文東-x5d 2 года назад

    Hi Derrick, I just wanna ask how python could locate the excel file you describe in the IDE, since there is no directory. Thanks

  • @Saywhatohno
    @Saywhatohno 4 года назад +1

    do you have a tutorial for index and match as well?

  • @ranjithraghunathan1267
    @ranjithraghunathan1267 3 года назад

    how to find the excel sheet you are using in the video...can i download it from them for easy learning ?

  • @dpkmusik
    @dpkmusik 3 года назад

    Hi Derrick,
    How can I merge 2 dataframes with duplication in keys in both the dataframes and I need a FIFO allocation of 2nd df values to 1st df value.
    Currently I use nested for loops, flags and it is very slow.

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

    Great video. Just to confirm my thinking. Are you saying that by merging two tables we are achieving what vlookup would do. which in this case there was two codes that had a corresponding value in the second table. And so merging the two tables means that only values are going to be filled in that column because the code appears in both tables?

  • @wasimakram6669
    @wasimakram6669 4 года назад

    Derrick Sherrill I love you 😍

  • @lovelyimranahamed
    @lovelyimranahamed 3 года назад

    This is great. I want to compare 2 excel workbook and print all the differences.. Can you please make video on this?

  • @Klara007-mi7
    @Klara007-mi7 2 года назад

    Amazing!

  • @duvanm2483
    @duvanm2483 4 года назад

    Thank you so much, bro. This will be very useful for my project that I plan to implement in my job!

  • @swapna_learner
    @swapna_learner 3 года назад

    How can a xlsb workbook can be read. Don't we need any libraries to be installed? Do I understand correctly that key column in the info file was not at left side which is requirement of excel vloomup

  • @srikrishnanr8155
    @srikrishnanr8155 4 года назад

    Hi is is possible to update a vlookup formula in an existing excel using openpyxl excel alone and that can be convert as values ??

  • @gervith103
    @gervith103 4 года назад

    How about when I need to vlookup from two tabs? In excel I use something like IFERROR(xlookup in TAB 1, xlookup in TAB 2). How to do that? Should I place IF statement to look in other table if the output is NA?

  • @rverm1000
    @rverm1000 5 лет назад

    I created a program to copy an Excel spreadsheet line into a older Microsoft Excel visual basic program . I wonder if the python program can be used to clean up the database. Is there a better way to record data.

  • @SofonToSafes
    @SofonToSafes 4 года назад

    Where can I find the A.xlsx and B.xlsx that you use above? Thanks a lot! Excellent job!

  • @1994siddhu
    @1994siddhu 2 года назад

    Hello Derrick, I had a question regarding using openpyxl and working with excel sheets using python. I want to link one cell from a sheet to another sheet within the excel file, so that when I click that cell, it takes me to a particular sheet in the file. I have been struggling to find a concrete solution but in vain. Is there any way in python to do the above task? Please let me know if you have any thoughts on this. It would help me greatly. Thank you.

  • @BAL31m89
    @BAL31m89 2 года назад

    Can you please share one by one all the excel functions and create one series as playlist. That will be great

  • @atulshrivastav6261
    @atulshrivastav6261 4 года назад

    Hi Derrick, I want to use vlookup function in existing excel sheet. Don't want to create any new data frame every time. Please help me on this with simple example. Awaiting your revert.

  • @BerryNijiaping
    @BerryNijiaping 4 года назад

    I just started learning python, and would like to achieve using python for excel automation.
    May I ask do you import pandas into Pycharm or ?

  • @duvanm2483
    @duvanm2483 4 года назад +1

    Hi bro. Could you please make a video where you explain how to select values from different rows and colums to create a new column. For instance, in the first row select the column 3 in the second row column 5 and so on. I would really appreciate it!

  • @peosaurus
    @peosaurus 4 года назад +33

    This seems like a lot more effort than just typing a look up lol

    • @Jandoesrun
      @Jandoesrun 3 года назад +4

      This is exponentially faster especially with tens of thousands of rows to million of rows

    • @puma7171
      @puma7171 3 года назад +8

      @@Jandoesrun with that many data you would probably want to stop using excel altogether and switch to a data software

    • @Darkspawn6666
      @Darkspawn6666 3 года назад +1

      en.wikipedia.org/wiki/Automation
      lol

    • @jennylee9283
      @jennylee9283 3 года назад

      Vlookup can’t do duplicated search?

  • @data_dave
    @data_dave 2 года назад

    good VOD

  • @riseagain4973
    @riseagain4973 3 года назад

    You ARE awesome

  • @itguy5192
    @itguy5192 4 года назад

    I need to know whether this can be automated or not: I get one raw data details on excel sheet on mail with attachment, this attached excel sheet gets automatically downloaded to certain location and then macro runs on that excel file as per schedule and then that excel sheet is send to several email addresses as per schedule without human intervention? What is required to do this automation?

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

    how can i do the vlookup function if i have more than 1 sheet in input workbook

  • @ittein
    @ittein 2 года назад

    could it do set the inplace to false and combine another col

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

    How do you lookup for one data that has a lot of data? For example, one ID with a lot of codes

  • @vijivijay2447
    @vijivijay2447 4 года назад

    Hi I want to print particular column which is not in row 0 but in row 6 so how do I print the values of the column

  • @NAVI05
    @NAVI05 4 года назад

    I got a case here.
    I have 4 excel reports with same kind of data but with different header (column) names in each report and also one of the report has 29 tabs with similar data but for different accounts. I need to append all the 29 tabs data + data from 3 other reports into one single excel report and I would only need few common columns from all the 4 excel reports. The tab name remains same throughout and all 4 reports gets updated once a week with their respective file names suffixed with latest date.
    How do we go about this using python? Appreciate your help. I have used power-query too but curious about using python.

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

    I am coding in python and pandas since 3 days. This one solved my problem. But simply cant believe that this is the best practise solution? Pandas must have a certain command for this simply task or am I wrong? Anyway, thx a lot.

  • @johnyoong1270
    @johnyoong1270 3 года назад

    can help to compare both vlookup and phyton timing?

  • @anthonykaburu3976
    @anthonykaburu3976 4 года назад

    Hi there. Thanks for the videos. How can I create a class markbook with python?

  • @enggsushant
    @enggsushant 5 лет назад +2

    Please make a video of appending one excel data to another excel data with similar columns. And then writing it to a new workbook

  • @anson2416
    @anson2416 3 года назад

    Hi Derrick, thanks for the video, it is really practical & easy. I got another query on excels which i have a few thounds of mobile number to validate for diff countries. May I know what is the best solution to calculate the invalid mobile (not in country code + mobile format)? Thanks!

  • @energygvr
    @energygvr 3 года назад

    Can you help me find a function in python that's equivalent to 'consolidate' function in excel ?

  • @partymaschine92
    @partymaschine92 3 года назад

    Hey, nice work! Thanks a lot for your effort! I‘m completely new to python. I wonder why we don‘t have to insert a full path to the excel files here or do I have to and you just skipped the info to keep the example easier?

  • @meera_1201
    @meera_1201 3 года назад

    Hi, Wen I try to print(df_3) an error pops up stating KeyError: [columnname] not in index
    Pls help!

  • @diegoojeda6399
    @diegoojeda6399 4 года назад

    excelente video muy util

  • @Iqbalvictorious
    @Iqbalvictorious 5 лет назад

    Plz guide whether vlookup method u shared on your video for python has same limitations like in excel i.e. it returns the the first record it finds or it can go to second record if first is already found earlier in the result column.

  • @ritambose562
    @ritambose562 5 лет назад +1

    how can i transfer the data after using Vlookup into a new excedl sheet ?

  • @AliTwaij
    @AliTwaij 3 года назад

    Brilliant

  • @frano5957
    @frano5957 3 года назад

    Hi Derrick, thank you for sharing your hard skills !
    I have a problem in my job, I need to compare two sheets on a same Workbook, I need to know if in the second sheet a first element exists in the first sheet, and same thing for a second element always from the second to the first sheet.
    My problem is that it is working for 50 lines (because I use two Vlookup embeded and two conditions), BUT the two sheets have ten thousands input (lines) eache one, and the Process Excel doesn't respond for 10000 lines, I need to kill the process excel.exe because it is down.

  • @currentbulb9955
    @currentbulb9955 4 года назад

    Thanks Derrick :)