I am working on following csv file in python: item,date,price($) milk,11/10/2021, 2 milk, 11/11/2021, 2 milk, 11/01/2022

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

I am working on following csv file in python: item,date,price($) milk,11/10/2021, 2 milk, 11/11/2021, 2 milk, 11/01/2022

Post by answerhappygod »

I am working on following csv file in python:
item,date,price($)
milk,11/10/2021, 2
milk, 11/11/2021, 2
milk, 11/01/2022, 2.3
egg,09/10/2021, 3
egg, 09/11/2021, 3.4
egg, 09/01/2022, 3.3
.... so on
How do I display the latest date and price of each
item from data. Example item: milk, latest date:
11/01/2022, price: $2.3 \n item: egg, latest date:
09/01/2022, price: $3.3.
use of dictionary preferred.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply