Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
merging data frames
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Better python library to create ER Diagram by using pandas data frames as tables klllmmm 0 992 Oct-19-2023, 01:01 PM
Last Post: klllmmm
  Is there a more elegant way to concatenate data frames? db042190 3 870 Jun-13-2023, 05:08 PM
Last Post: snippsat
  Merging two Data Frame on a special case piku9290dgp 0 1,069 Mar-02-2022, 10:43 AM
Last Post: piku9290dgp
  How to map two data frames based on multiple condition SriRajesh 0 1,448 Oct-27-2021, 02:43 PM
Last Post: SriRajesh
  Moving Rows From Different Data Frames JoeDainton123 1 4,292 Aug-06-2020, 05:19 AM
Last Post: scidam
  Comparing Items Different Data Frames With a WHILE Loop JoeDainton123 1 1,926 Jul-30-2020, 04:11 AM
Last Post: scidam
  Merge CSV Column using Pandas Data Frames davidlang 1 2,587 May-01-2020, 02:43 PM
Last Post: klllmmm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020