Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MisaghMomeniB/CSV-Viewer-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

27 Commits

Repository files navigation

πŸ—„οΈ 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
  2. Features
  3. Requirements
  4. Installation
  5. Usage
  6. Code Structure
  7. Enhancement Ideas
  8. Contributing
  9. 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

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:

python csv_viewer.py --path data.csv --delimiter comma --sample 20

Available flags:

  • --path <file>: Path to your CSV/TSV file
  • --delimiter <char>: comma, semicolon, tab, or custom
  • --sample <int>: Number of rows to preview (default: 10)
  • --sort <column>: Sort preview by this column
  • --export <file>: 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.

About

A Powerful Pyqt5-based Csv File Viewer With Advanced Data Visualization and Editing Capabilities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /