- Project Overview Name
CSV Viewer
Purpose
Lightweight, high-performance CSV viewer optimized for:
Large files (100k–1M+ rows)
Fast filtering & sorting
Read-only viewing
Copy/export subsets
Target Platforms
Windows (primary)
macOS
Linux (optional)
- Tech Stack
Python 3.12+
PySide6
Optional: DuckDB (for very large files >500MB)
Optional: pandas (for convenience mode, small files only)
- Core Functional Requirements 3.1 File Handling Input
Drag & drop .csv
Menu → Open
Command line: fastcsv file.csv
Encoding
UTF-8 default
Auto-detect fallback (chardet optional)
Delimiter
Auto-detect:
,
;
\t
User override option
3.2 Data Model Architecture QMainWindow ├── QTableView ├── QSortFilterProxyModel └── CsvTableModel (QAbstractTableModel) Key Principle
Use QAbstractTableModel → No widget per cell → Virtual rendering → High performance
3.3 Table Behavior Display
Virtualized rows
Resizable columns
Auto column width (first 100 rows sampling)
Horizontal & vertical scroll
Sorting
Click column header
Toggle ASC / DESC
Use QSortFilterProxyModel
Filtering
Two modes:
Mode A – Global Search
Top search bar
Case insensitive
Filters all columns
Mode B – Column Filter
Right-click header → “Filter…”
Exact match
Contains
Regex (optional advanced mode)
3.4 Clipboard Support
Ctrl+C → copies selected rows as CSV
Right-click → Copy with header
Copy visible filtered result
3.5 Performance Strategy Small Files (<50MB)
Load into memory (list of lists)
Medium Files (50MB–500MB)
Lazy row loading
Avoid full DataFrame
Large Files (>500MB)
Optional DuckDB mode:
select * from 'file.csv' limit 100000
Stream query
Paginated view
No full RAM load
- Non-Functional Requirements Startup time
< 1 second (without file)
File load
100k rows < 1 sec
1M rows < 3–5 sec (no heavy formatting)
Memory
Should not exceed 2–3x file size