I have two csv files that I want to read in as dataframes with pandas. I want to merge them, with the exception that showing times cannot be duplicated.
If a ShowingDateTime is a duplicate I want to select the row from the first dataframe and not the second. I am not sure the best way to do this with pandas. I want to sort based on Ascending order for ShowingDateTime after.
CSV1:
Address,City,State,ShowingDateTime
1234 Hodge Street,Brown,CA,1/4/17 12:00
9613 Llama Street,Downtown,CA,1/5/17 12:15
7836 Bob Street,Swamp,CA,1/5/17 12:30
2134 Cardinal Street,Ruler,CA,1/6/17 11:30
CSV2:
Address,City,State,ShowingDateTime
10234 Peek Street,Brown,CA,1/4/17 12:00
1122 Kara Street,Downtown,CA,1/5/17 12:30
1023 Solr Street,Swamp,CA,1/6/17 11:30
2234 Tempura Street,Ruler,CA,1/6/17 12:00
Expected Merged Result (written to a csv after df merge):
1234 Hodge Street,Brown,CA,1/4/17 12:00
9613 Llama Street,Downtown,CA,1/5/17 12:15
7836 Bob Street,Swamp,CA,1/5/17 12:30
2134 Cardinal Street,Ruler,CA,1/6/17 11:30
2234 Tempura Street,Ruler,CA,1/6/17 12:00