I'd like to merge two data frames with near times values leaving one index fixed to search in the other data frame (similar to vlookup in excel). Can you recommend another worflow?
I followed this process but is not working
import pandas as pd
# read csv data
path = r"C:\Users\Documents\"
df1 = pd.read_csv(path + '\obs_heads.csv')
df2 = pd.read_csv(path + '\sim.csv')
t = pd.merge_asof(df1, df2, on="A2")
print(t)
Input:
Data frame 1:
Data frame 2:
Output:
Error:
enter image description here Thanks,


