Awesome-Python-Scripts/Better_CSV_Storage/README.md
Bhargav Kuvadiya ad1cc40043
[+] Added : New Script To Manage CSV For Storage
-> will allow the user to manage CSV files
-> filter data based on certain conditions.
-> update data at particular row in csv.
2022-10-09 10:24:24 +05:30

43 lines
1015 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

p
# Better CSV Storage
-> For User / Programmer who don't want to use databases and want to use csv instead, this script will help manage that csv file (storage)
### What you Can Do ?
-> Filter Data Based On Certain Conditions that you provide,
-> Update Certain Value in particular row.
### How to use ?
-> It's OOP based Script so just import that in you Regular Script.
-> For Example,
-> I want to check and download_status of files.
-> csv file i have used -> `dummy_data.csv`
```python
csv_path = 'dummy_data.csv'
#init class and get the object
csv_obj = BetterCSVStorage(csv_path)
#Now user that object as storage
#Filter Data Based on Different parameters
#This List will contain additional ( update_index ) which is row index of each row in csv.
#This update_index will be use to update value of certain index.
filtered_data = csv_obj.get_filtered_data('download_status', '==', '')
#Change Data Based on Different parameters
csv_obj.update_data(10,'download_status', 'done')
```