Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

csv_parser_python

A quick python script to parse csv file to perform data manipulation on the parsed data

We have a csv file that looks like this

Id,Vendor,Product Name,Product Code,Unit,Weight,Price1,Vendor1,Coriander Leaves (April-Nov),3736,Kg,3,902,Vendor1,Mint Leaves 500 Gm,4371,Grams,500,27.53,Vendor1,Ginger 500 Gm,4356,Grams,500,29.54,Vendor1,Lemon 500 Gm,4365,Grams,500,32.55,Vendor2,Coriander Leaves (April-Nov),3736,Kg,3,806,Vendor2,Mint Leaves 500 Gm,4371,Grams,500,27.57,Vendor2,Ginger 500 Gm,4356,Grams,500,308,Vendor2,Lemon 500 Gm,4365,Grams,500,319,Vendor3,Coriander Leaves (April-Nov),3736,Kg,3,8810,Vendor3,Mint Leaves 500 Gm,4371,Grams,500,27.311,Vendor3,Ginger 500 Gm,4356,Grams,500,29.712,Vendor3,Lemon 500 Gm,4365,Grams,500,34.5
..
..
..
i.e.,product list from multiple vendors and their price offerrings

Unfortunately, the file is consolidated and we need a better way to extract useful information.

We would like to be able to generate a product list based on:

- cheapest prices
- expensive prices
- get cheapest price list only for given product IDs [3736, 4356, 3732, 3746, 3759, 3719, 3740, 4341]

For example, for cheapest prices, we would get a list like:

 3,Vendor1,Ginger 500 Gm,4356,Grams,500,29.5
5,Vendor2,Coriander Leaves (April-Nov),3736,Kg,3,80
8,Vendor2,Lemon 500 Gm,4365,Grams,500,31
10,Vendor3,Mint Leaves 500 Gm,4371,Grams,500,27.3

Usage

>>>pythonproducts.py

About

A quick python script to parse csv file to perform data manipulation

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages