I have two dataframes, both with timestamp indexes. They have similar columns (the second dataframe lacks two columns). The second dataframe is also regularly re-created every second with new data, from some API. How can I continuously update the first dataframe with the information from the second (or the API)?
First dataframe looks like this:
Open High ... MA EMA
2021-04-29 09:31:00 583.473999 583.473999 ... NaN NaN
2021-04-29 09:32:00 584.304932 585.394850 ... 584.349534 583.983949
Second one looks like this:
Open High Low Close
2021-04-29 09:33:00 578.107 579.412 577.942 579.251
I've already tried join
, append
, concat
, combine_first
, and update
, all wrapped in some asyncio loop, with no success on any of them. They either don't update the first dataframe at all, or it doesn't overwrite the same index.