In the following table I have a list of dates. I am trying to index the second dataframe and extract the corresponding value in the first dataframe. I want to create column D.
I have referenced Pandas Merge returns NaN as well, and both columns are indeed the same type(str)
print(data)
A          B
1/1/17     15
1/2/17     16
1/3/17     14
1/4/17     15
1/5/17     16
1/6/17     14
1/7/17     15
1/8/17     16
1/9/17     14
print(lookup)
C         D
1/4/17    15
1/7/17    15
1/8/17    16
So basically I have the 'data' pandas dataframe, but I dont know how to create a column D in the 'lookup' dataframe to populate the two 15 and the 16 values. This is a smaller example of a bigger problem, Im trying to utilize a similar reference table to create a column in a much larger dataframe that pulls off the reference table. The dates in column C clearly already exist in the lookup dataframe as they are what im trying to use as a reference.
Thanks for your help !
 
     
     
    