TransWikia.com

how to implement Excel vlookup on Python

Data Science Asked by UZOCHUKWU URUAKPA on November 29, 2020

I have a dataset A and dataset B, both data has a column in common which is the ID, i want to check if dataset A ID values can be found in dataset B ID values. Also get the records of dataset B that have the same value with dataset A. I can do this on excel using vlookup, but I want to automate the process using python.

NOTE:
1. dataset B has 10020 rows while dataset A has 2039 rows.
2. The ID column is numeric.

Thanks.

One Answer

  1. You will want to load your data in two pandas data frames (if you haven't already)
  2. Next you will need to use dataframe.join():

Note: You might want to think about the mode (inner, outer, left or right)

Answered by S van Balen on November 29, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP