https://github.com/misaghmomenib/csv-viewer-python
A Powerful Pyqt5-based Csv File Viewer With Advanced Data Visualization and Editing Capabilities
https://github.com/misaghmomenib/csv-viewer-python
csv csv-viewer git open-source python3
Last synced: about 2 months ago
JSON representation
A Powerful Pyqt5-based Csv File Viewer With Advanced Data Visualization and Editing Capabilities
- Host: GitHub
- URL: https://github.com/misaghmomenib/csv-viewer-python
- Owner: MisaghMomeniB
- Created: 2025-03-31T06:18:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-31T06:52:28.000Z (about 1 year ago)
- Last Synced: 2025-03-31T07:27:52.781Z (about 1 year ago)
- Topics: csv, csv-viewer, git, open-source, python3
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ποΈ CSV Viewer (Python)
A lightweight and user-friendly **CSV viewer** built with Python, designed for quick inspection and basic manipulation of CSV, TSV, or other delimited text files.
---
## π Table of Contents
1. [Overview](#overview)
2. [Features](#features)
3. [Requirements](#requirements)
4. [Installation](#installation)
5. [Usage](#usage)
6. [Code Structure](#code-structure)
7. [Enhancement Ideas](#enhancement-ideas)
8. [Contributing](#contributing)
9. [License](#license)
---
## π‘ Overview
This tool lets users easily view tabular data from CSV or delimited files via a CLI. It provides quick insights into large datasets without the need for spreadsheets or data-heavy tools by leveraging Pythonβs standard libraryβ―:contentReference[oaicite:1]{index=1}.
---
## β
Features
- π Read local delimited files (CSV, TSV, custom separators)
- π’ Display row count, headers, and sample rows
- π Sort data by column alphabetically or numerically
- β
Clean handling of missing or malformed lines
- π οΈ Option to export a cleaned/filtered view to a new file
---
## π§Ύ Requirements
- Python **3.7+**
- Only uses the Python **standard library** (`csv`, `argparse`, `sys`, etc.)
---
## βοΈ Installation
```bash
git clone https://github.com/MisaghMomeniB/CSV-Viewer-Python.git
cd CSV-Viewer-Python
python3 --version # Confirm Python β₯3.7
````
---
## π Usage
### CLI Options
Basic usage:
```bash
python csv_viewer.py --path data.csv --delimiter comma --sample 20
```
Available flags:
* `--path `: Path to your CSV/TSV file
* `--delimiter `: `comma`, `semicolon`, `tab`, or custom
* `--sample `: Number of rows to preview (default: 10)
* `--sort `: Sort preview by this column
* `--export `: Save cleaned/sample rows to a new file
---
## π Code Structure
```
CSV-Viewer-Python/
βββ csv_viewer.py # Main CLI + core logic
βββ README.md # You're reading it!
βββ LICENSE
```
Inside `csv_viewer.py`:
* Argparse handles CLI options
* Uses `csv.reader` / `csv.DictReader` for parsing
* Basic validation of headers, row counts, and empty fields
* Functions to preview and optionally export data
---
## π‘ Enhancement Ideas
* π Add interactive filter options (e.g., show rows where column > value)
* π¦ Support export to formats like JSON or Markdown tables
* π Integrate with Pandas for advanced previews or plotting
* π§ Build a GUI with libraries like Tkinter or PyQt
* π Add batch previewing for multi-file browsing
---
## π€ Contributing
Improvements welcome! Possible additions:
* Support large files via streaming
* Implement real-time file watching
* Add deduplication or column-based filters
**To contribute**:
1. Fork this repo
2. Create a branch (`feature/...`)
3. Write clear, well-commented code
4. Open a Pull Request with a description of changes
---
## π License
Licensed under the **MIT License** β see `LICENSE` file for details.