I have a dataset containing information of some purchases starting on 03/01/2018 03:00 and ending on  25/04/2022 15:00. There's no pattern between dates and times of purchase occurrences. For instance, there's no purchase happening on 04/01/2018 05:00 or 04/01/2018 15:00, etc. For each day, I am trying to find the latest time in which a purchase has happened.
For example, based on the following dataset, is it possible to have a dictionary that as a key stores dates and as a value the latest price of the purchase?
"03/01/2018" => 9.3
"04/01/2018" => 5.4
"03/01/2019" => 7.6
.... all the way to 25/04/2022 15:00

Using InMemoryDatasets package:
ds=Dataset(df)
setformat!(ds,:date=>yearmonthday) # no data modification - lazy format
unique(ds,:date,keep=:last,mapformats=true)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With