Python Forum

Full Version: merging data frames
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am relatively new to python.
If I have a dataframe where the first column is an index with DateTime values, and the second column is price, and then I have another dataframe with the same makeup, how do I create a 3rd dataframe that only keeps data starting from the time of the youngest data set.

So If df1 has data that starts in 1970 and has price starting in 1970.
And df2 has data that starts in 1980.

I want df3 to have time starting in 1980 and to ignore data before that. So throwing any data out if the other data frame does not have data at that timestamp.