How to efficiently combine two large Pandas dataframes by datetime
pd.merge_asof will help match based on the closest time.
I'm a bit of a noob when it comes to large datasets and was hoping someone could point me in the right direction.
I have two large data frames that i need to merge based on datetime.
Dataframe 1:

250 million rows of data
Datetime index
Colums containing motion sensor values

Dataframe 2:

50 million row of data
Datetime index
Columns containing easting and northings

I want to add easting and northings from dataframe2 to dataframe 1 based on the closest datetime. I have tried a few different methods (i.e. df.index.get_loc, df.interpolate) but the processing time is huge and memory becomes unstable very quickly. Is there a way to process this without iterating through the dataframes? Any help would be great.