Replace Excel Vlookup with Python - Five Minute Python Scripts

Описание к видео Replace Excel Vlookup with Python - Five Minute Python Scripts

Subscriber special! We'll look at how we can replace the vlookup function in excel using python and pandas.

Kite helps fund the channel, thanks for checking them out and supporting me --
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. https://www.kite.com/get-kite/?utm_me...

We'll cover:
Reading in multiple excel sheets
Merging dataframes
Renaming column names
Exporting to Excel

#Python #Excel #Automation

If you have your own request on what you want to see. Please let me know! I'm happy to help.

THANK YOU ALL for so much support! You all are incredible. 3150+ Subscribers, I'm so glad you all enjoy the content enough to follow me. You all are awesome.

*****************************************************************
Full code from the video:
import pandas as pd
import numpy as np

initial_workbook = 'A.xlsx'
info_workbook = 'B.xlsx'
output_workbook = 'output.xlsx'

df_initial = pd.read_excel(initial_workbook)
df_info = pd.read_excel(info_workbook)

print(df_initial.columns)
print(df_info.columns)

df_initial.rename(columns={'Code':'IDs'}, inplace=True)

df_3 = pd.merge(df_initial, df_info[['IDs','ID']], on='IDs', how='left')
print(df_3)

df_3.rename(columns={'IDs':'Code'}, inplace=True)

df_3 = df_3.replace(np.nan, '', regex=True)
print(df_3)

df_3.to_excel(output_workbook, index=False)

Or find it on my Github here:
https://github.com/Derrick-Sherrill/D...

*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/D...

Check out my website:
https://www.derricksherrill.com/

If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!

--- Channel FAQ --

What text editor do you use?
Atom - https://atom.io/

What Equipment do you use to film videos?
Blue Yeti Microphone - https://amzn.to/2PcNj5d
Mic sound shield - https://amzn.to/3bVNkEt
Soundfoam - https://amzn.to/37NV9ci
Camera desk stand - https://amzn.to/3bX8xhm
Box Lights - https://amzn.to/2PanL95
Side Lights - https://amzn.to/37KSNut
Green Screen - https://amzn.to/37SFFnc

What computer do you use/desk setup?
Film on imac (4k screen) - https://amzn.to/37SEu7g
Work on Macbook Pro - https://amzn.to/2HJ5b3G
Video Storage - https://amzn.to/2Pey8sw
Mouse - https://amzn.to/2PhCtv3
Desk - https://amzn.to/37O1Mv1
Chair - https://amzn.to/2uqHE4E

What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations

Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sh...

Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/...

Let me know if there's anything else you want answered!

-------------------------

Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!

Комментарии

Информация по комментариям в разработке