https://github.com/app-generator/devtool-data-converter
Open-Source Data Converter - CVS, XLS, DF | AppSeed
https://github.com/app-generator/devtool-data-converter
appseed-sample data-converter data-science
Last synced: 11 months ago
JSON representation
Open-Source Data Converter - CVS, XLS, DF | AppSeed
- Host: GitHub
- URL: https://github.com/app-generator/devtool-data-converter
- Owner: app-generator
- License: other
- Created: 2022-02-08T09:59:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T12:43:15.000Z (over 3 years ago)
- Last Synced: 2025-03-11T05:55:14.986Z (over 1 year ago)
- Topics: appseed-sample, data-converter, data-science
- Language: CSS
- Homepage: https://appseed.us/developer-tools/
- Size: 3.34 MB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Data Converter
This [developer tool](https://appseed.us/developer-tools/) provides simple helpers for data management - provided by [AppSeed](https://appseed.us/).
- 👉 Free [support](https://appseed.us/support/) via Email and [Discord](https://discord.gg/fZC6hup)
- 👉 More [Developer Tools](https://appseed.us/developer-tools/) - provided by AppSeed
> Features
- CSV Files:
- Print
- Columns: Remove, Update
- Add New Column with random values:
- `timestamp`, `random_int` and `random string` (via Faker)
- `csv_to_json` Helper
- [Support](https://appseed.us/support) via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup).
The project is bundled with a simple `Flask` app that loads the information from `samples/data.csv` and presents the information using data tables.
## ✨ Quick Start
- Clone the project
- Install Python modules:
- `pip install -r requirements.txt`
- Start the `Flask` app
- The `http://localhost:5000/datatables/` route will display the contents of `samples/data.csv` using data tables.
- Save your CSV content using the same file
- `samples/data.csv`
- Refresh the `http://localhost:5000/datatables/` page
At this point, you should see your data nicely paginated.

## ✨ Complete Set UP
> Clone Sources (this repo)
```bash
$ git clone https://github.com/app-generator/devtool-data-converter.git
$ cd devtool-data-converter
```
> Install Modules using a Virtual Environment
```bash
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
```
Or for **Windows-based Systems**
```bash
$ virtualenv env
$ .\env\Scripts\activate
$
$ # Install modules - SQLite Database
$ pip3 install -r requirements.txt
```
> Set up the environment
```bash
$ export FLASK_APP=run.py
$ export FLASK_ENV=development
```
Or for **Windows-based Systems**
```bash
$ # CMD terminal
$ set FLASK_APP=run.py
$ set FLASK_ENV=development
$
$ # Powershell
$ $env:FLASK_APP = ".\run.py"
$ $env:FLASK_ENV = "development"
```
> Edit `sample/data.csv` manually or using a `Python` console:
Open a new terminal, activate the `VENV` and update the `CSV` sample using provided helpers:
```
$ python
>>>
>>> from util import *
>>> input = 'samples/data.csv'
>>> csv_print( input )
```
> Print only 2 lines
```python
>>> from util import *
>>> input = 'samples/data.csv'
>>>
>>> csv_print( input ) # print all file
>>>
csv_print( input, 2 ) # print header and first 2 lines
...
product_code,product_info,value,currency,type
Nike_Air,Nike Air More Uptempo,105,usd,transaction
Nike_Club,Nike Club Joggers BB,55,usd,transaction
```
> Remove a column from the the `CSV` file
```python
>>> csv_col_remove( input, 'value' ) # `vaue` is the column name
```
> Add a column to the `CSV` file
```python
>>> csv_col_add( input, 'value' ) # `vaue` is the column name
```
---
Data Converter - Provided by **AppSeed** [App Generator](https://appseed.us/app-generator).