Рет қаралды 228,540
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. www.kite.com/g...
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:
github.com/Der...
*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
github.com/Der...
Check out my website:
www.derrickshe...
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 - atom.io/
What Equipment do you use to film videos?
Blue Yeti Microphone - amzn.to/2PcNj5d
Mic sound shield - amzn.to/3bVNkEt
Soundfoam - amzn.to/37NV9ci
Camera desk stand - amzn.to/3bX8xhm
Box Lights - amzn.to/2PanL95
Side Lights - amzn.to/37KSNut
Green Screen - amzn.to/37SFFnc
What computer do you use/desk setup?
Film on imac (4k screen) - amzn.to/37SEu7g
Work on Macbook Pro - amzn.to/2HJ5b3G
Video Storage - amzn.to/2Pey8sw
Mouse - amzn.to/2PhCtv3
Desk - amzn.to/37O1Mv1
Chair - amzn.to/2uqHE4E
What editing software do you use?
Adobe CC - www.adobe.com/...
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
www.udemy.com/...
Where do I get my music?
I get all my music from the copyright free KZbin audio library
www.youtube.co...
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!