Python Forum
VLOOKUP Equivalent using openpyxl - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: VLOOKUP Equivalent using openpyxl (/thread-16845.html)



VLOOKUP Equivalent using openpyxl - DJBuck - Mar-17-2019

Hi, apologies for any naivety but I am only just beginning my foray into the world of python!
I am looking to extract data from an excel spreadsheet, utilising something similar to the VLOOKUP function in Excel.

Would someone be able to talk me through this?
For example, if I had a table of data:
A 1
B 2
C 3

I would like an input variable of "A" to retrieve the corresponding value 1.

Thanks in advanced, I imagine it isn't a complex task but being so very green I need a hand!


RE: VLOOKUP Equivalent using openpyxl - Larz60+ - Mar-17-2019

see: https://automatetheboringstuff.com/chapter12/
And there is pandas: https://pbpython.com/excel-pandas-comp.html
(other tutorials are available, use google)


RE: VLOOKUP Equivalent using openpyxl - DJBuck - Mar-17-2019

Thanks, I'll look into it!