dataframe-textual 2.42.0__tar.gz → 2.45.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/PKG-INFO +217 -141
  2. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/README.md +216 -140
  3. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/pyproject.toml +1 -1
  4. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/__main__.py +7 -4
  5. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/common.py +51 -65
  6. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/data_frame_table.py +249 -95
  7. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/data_frame_viewer.py +71 -10
  8. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/table_screen.py +405 -212
  9. dataframe_textual-2.45.0/src/dataframe_textual/text_screen.py +33 -0
  10. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/yes_no_screen.py +654 -5
  11. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/uv.lock +1 -1
  12. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/.gitignore +0 -0
  13. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/LICENSE +0 -0
  14. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/main.py +0 -0
  15. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/__init__.py +0 -0
  16. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/data_frame_help_panel.py +0 -0
  17. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/file_picker_screen.py +0 -0
  18. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/loading_screen.py +0 -0
  19. {dataframe_textual-2.42.0 → dataframe_textual-2.45.0}/src/dataframe_textual/theme_screen.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataframe-textual
3
- Version: 2.42.0
3
+ Version: 2.45.0
4
4
  Summary: Interactive terminal viewer/editor for tabular data
5
5
  Project-URL: Homepage, https://github.com/need47/dataframe-textual
6
6
  Project-URL: Repository, https://github.com/need47/dataframe-textual.git
@@ -54,7 +54,7 @@ A powerful, interactive terminal-based viewer/editor for CSV/TSV/Excel/[Parquet]
54
54
 
55
55
  ### Data Manipulation
56
56
  - 📝 **Data Editing** - Edit cells, delete rows, remove columns, and explode columns
57
- - 🧹 **Duplicate Removal** - Remove duplicate rows while keeping the first occurrence
57
+ - 🧹 **Duplicate Removal** - Remove duplicate rows
58
58
  - 🔍 **Search & Filter** - Find values, highlight matches, and filter selected rows
59
59
  - ↔️ **Column/Row Reordering** - Move columns and rows with simple keyboard shortcuts
60
60
  - 📈 **Sorting & Statistics** - Multi-column sorting, frequency distribution, and histogram analysis
@@ -134,8 +134,8 @@ dv *.parquet --all-in-one
134
134
  ## Command Line Options
135
135
 
136
136
  ```
137
- usage: dv [-h] [-V] [-d DELIMITER] [-f FORMAT] [-F [FIELDS ...]] [-H [HEADER ...]] [-L [N]] [-I] [-T] [-E] [-C [PREFIX]] [-Q [C]] [-K N] [-A N] [-M [N]] [-N NULL [NULL ...]] [--theme [THEME]]
138
- [--all-in-one] [--expr EXPR] [--sql SQL] [-o OUTPUT]
137
+ usage: dv [-h] [-V] [-d DELIMITER] [-f FORMAT] [-F [FIELDS ...]] [-H [HEADER ...]] [-L [N]] [-I] [-T] [-E] [-C [C]] [-Q [C]] [-K N] [-A N] [-M [N]] [-N NULL [NULL ...]] [--theme [THEME]] [--all-in-one]
138
+ [--expr EXPR] [--sql SQL] [-o OUTPUT]
139
139
  [files ...]
140
140
 
141
141
  TUI viewer/editor for tabular data (e.g., CSV/Excel).
@@ -157,12 +157,12 @@ options:
157
157
  Specify header info. When reading CSV/TSV. If used without values, assumes no header. Otherwise, use provided values as column header (e.g., `-H col1 col2 col3`).
158
158
  -L, --infer_schema_length [N]
159
159
  Number of rows to use for inferring schema when reading CSV/TSV. Defaults to 100. When used without value, uses all rows for schema inference (can be slow for large files).
160
- -I, --no-inference Do not infer data types when reading CSV/TSV
160
+ -I, --no-inference Do not infer data types when reading CSV/TSV. All values will be of string type.
161
161
  -T, --truncate-ragged-lines
162
162
  Truncate ragged lines when reading CSV/TSV
163
163
  -E, --ignore-errors Ignore errors when reading CSV/TSV
164
- -C, --comment-prefix [PREFIX]
165
- Skip comment lines starting with `PREFIX` when reading CSV/TSV
164
+ -C, --comment-prefix [C]
165
+ Skip comment lines starting with `C` when reading CSV/TSV
166
166
  -Q, --quote-char [C] Use `C` as quote character for reading CSV/TSV. When used without value, disables special handling of quote characters.
167
167
  -K, --skip-lines N Skip first N lines when reading CSV/TSV
168
168
  -A, --skip-rows-after-header N
@@ -203,13 +203,13 @@ dv data_no_header.csv -H
203
203
  # View headless CSV file with provided header
204
204
  dv data_no_header.csv -H country ip requests
205
205
 
206
- # Skip first 3 lines of file (e.g., metadata)
206
+ # Skip first 3 rows (e.g., metadata)
207
207
  dv data_with_meta.csv -K 3
208
208
 
209
209
  # Skip 1 row after header (e.g., units row)
210
210
  dv data_with_units.csv -A 1
211
211
 
212
- # Complex CSV with comments and units row
212
+ # Skip 3 rows before header and 1 row after
213
213
  dv messy_scientific_data.csv -K 3 -A 1
214
214
 
215
215
  # Skip comment lines (or just -C)
@@ -221,7 +221,7 @@ dv large_data.csv -I
221
221
  # Ignore parsing errors in malformed CSV
222
222
  dv data_with_errors.csv -E
223
223
 
224
- # Treat specific values as null/missing (e.g., 'NA', 'N/A')
224
+ # Treat specific values as null (e.g., 'NA', 'N/A')
225
225
  dv data.csv -N NA N/A
226
226
 
227
227
  # Use different quote character (e.g., single quote for CSV)
@@ -242,7 +242,7 @@ dv data.csv -F name age 1 -1
242
242
  # Read all files (must be of same format and same structure) into one single table
243
243
  dv data-1.csv data-2.csv --all-in-one
244
244
 
245
- # Filter rows before opening the viewer using a Polars expression
245
+ # Filter rows before opening the TUI using a Polars expression
246
246
  dv data.csv --expr '$age > 30'
247
247
 
248
248
  # Filter data using SQL query (use 'self' as the table name)
@@ -262,21 +262,26 @@ dv data.csv -o data.parquet
262
262
  | -------------- | ------------------------------------------------------------- |
263
263
  | `q` | Close current tab (prompts to save unsaved changes) |
264
264
  | `Q` | Close all tabs and quit app (prompts to save unsaved changes) |
265
+ | `Ctrl+Q` | Force to quit app (regardless of unsaved changes) |
265
266
  | `space` | Toggle tab bar visibility |
266
267
  | `b` | Next tab |
267
268
  | `B` | Previous tab |
268
269
  | `>` | Move current tab right (wrap to first) |
269
270
  | `<` | Move current tab left (wrap to last) |
270
- | `Ctrl+Q` | Force to quit app (regardless of unsaved changes) |
271
- | `Ctrl+V` | Save current view to file |
272
271
  | `Ctrl+T` | Save current tab to file |
273
272
  | `Ctrl+S` | Save all tabs to file |
273
+ | `Ctrl+V` | Save current view to file |
274
274
  | `w` | Save current tab to file (overwrite without prompt) |
275
275
  | `W` | Save all tabs to file (overwrite without prompt) |
276
276
  | `Ctrl+D` | Duplicate current tab |
277
277
  | `Ctrl+O` | Open file in a new tab |
278
+ | `Ctrl+N` | Create new tab from Polars expression |
278
279
  | `Double-click` | Rename tab |
279
280
 
281
+ **Tips:**
282
+ - Tabs with unsaved changes are indicated with a bright background
283
+ - Closing or quitting a tab with unsaved changes triggers a save prompt
284
+
280
285
  #### View & Settings
281
286
 
282
287
  | Key | Action |
@@ -295,7 +300,7 @@ dv data.csv -o data.parquet
295
300
  | ---------------------------- | -------------------------- |
296
301
  | `g` | Go to first row |
297
302
  | `G` | Go to last row |
298
- | `Ctrl + G` | Go to row |
303
+ | `Ctrl + G` | Go to specific row |
299
304
  | `↑` / `↓` | Move up/down one row |
300
305
  | `←` / `→` | Move left/right one column |
301
306
  | `Home` / `End` | Go to first/last column |
@@ -313,25 +318,27 @@ dv data.csv -o data.parquet
313
318
 
314
319
  #### Display
315
320
 
316
- | Key | Action |
317
- | ---------------- | ------------------------------------------------------------------ |
318
- | `Enter` | Show details for the current row |
319
- | `Tab` | Show current cell details; press `Tab` again there to drill deeper |
320
- | `F` | Show frequency distribution for current column |
321
- | `i` | Show histogram for current column |
322
- | `I` | Show histogram for current column with custom bins |
323
- | `s` | Show statistics for current column |
324
- | `S` | Show statistics for entire dataframe |
325
- | `m` | Show metadata for row count and column count |
326
- | `M` | Show metadata for current column |
327
- | `K` | Cycle cursor types: cell → row → column → cell |
328
- | `~` | Toggle row labels |
329
- | `_` (underscore) | Toggle column full width |
330
- | `f` | Toggle freeze rows and/or columns |
331
- | `,` | Toggle thousand separator for numeric display |
332
- | `&` | Set current row as the new header row |
333
- | `h` | Hide current column |
334
- | `H` | Show all hidden columns |
321
+ | Key | Action |
322
+ | ---------------- | ---------------------------------------------------------------------- |
323
+ | `Enter` | Show details for the current row as two-column key–value pairs |
324
+ | `Tab` | Show current cell details; press `Tab` again there to drill deeper |
325
+ | `F` | Show frequency distribution for current column |
326
+ | `i` | Show histogram for current column |
327
+ | `I` | Show histogram for current column with custom bins |
328
+ | `s` | Show statistics for current column |
329
+ | `S` | Show statistics for entire dataframe |
330
+ | `=` | Show histogram using first column as label and current column as value |
331
+ | `m` | Show metadata for file name, row count, and column count |
332
+ | `M` | Show metadata for columns (e.g., data types) |
333
+ | `K` | Cycle cursor types: cell → row → column → cell |
334
+ | `~` | Toggle row labels |
335
+ | `_` (underscore) | Toggle column full width |
336
+ | `+` | Toggle freeze rows and/or columns |
337
+ | `,` | Toggle thousand separator for numeric display |
338
+ | `^` | Toggle internal row index column (RID) |
339
+ | `&` | Set current row as the new header row |
340
+ | `h` | Hide current column |
341
+ | `H` | Show all hidden columns |
335
342
 
336
343
  #### Editing
337
344
 
@@ -351,7 +358,7 @@ dv data.csv -o data.parquet
351
358
  | `Ctrl+X` | Delete current row and all those above |
352
359
  | `d` | Duplicate current column |
353
360
  | `D` | Duplicate current row |
354
- | `=` | Remove duplicate rows (keep first occurrence) |
361
+ | `Ctrl+Delete` | Remove duplicate rows (keep first occurrence) |
355
362
  | `o` | Explode current list column into multiple rows |
356
363
  | `O` | Explode current string column by delimiter into multiple rows |
357
364
 
@@ -380,13 +387,14 @@ dv data.csv -o data.parquet
380
387
  | `r` | Find and replace in current column (interactive or replace all) |
381
388
  | `R` | Find and replace across all columns (interactive or replace all) |
382
389
 
383
- #### View & Filter
384
- | Key | Action |
385
- | ----------- | ------------------------------------------------ |
386
- | `v` | View selected rows |
387
- | `V` | View selected by expression |
388
- | `.` | View rows with non-null values in current column |
389
- | `"` (quote) | Filter selected rows to a new tab |
390
+ #### Filter & Collect
391
+ | Key | Action |
392
+ | ----------- | ------------------------------------------------------ |
393
+ | `v` | Basic filter using the current cell value |
394
+ | `V` | Advanced filter with value or expression |
395
+ | `.` | Filter rows with non-null values in the current column |
396
+ | `f` | Filter rows using values in the current column |
397
+ | `"` (quote) | Collect rows to a new tab |
390
398
 
391
399
  #### Sorting (supporting multiple columns)
392
400
 
@@ -430,23 +438,46 @@ dv data.csv -o data.parquet
430
438
 
431
439
  ## Features in Detail
432
440
 
433
- ### 1. Color-Coded Data Types
441
+ ### 1. Display & UI
434
442
 
435
- Columns are automatically styled based on their data type:
436
- - **integer**: Cyan text, right-aligned
437
- - **float**: Yellow text, right-aligned
438
- - **string**: Green text, left-aligned
439
- - **boolean**: Blue text, centered
440
- - **temporal**: Magenta text, centered
443
+ Columns are automatically styled based on their data types:
444
+
445
+ | Data Type | Text Color | Alignment |
446
+ | --------- | ---------- | --------- |
447
+ | integer | Cyan | right |
448
+ | float | Yellow | right |
449
+ | string | Green | left |
450
+ | boolean | Blue | centered |
451
+ | temporal | Magenta | centered |
452
+
453
+ **Hide/Show Columns** (`h` / `H`):
454
+ - `h` - Temporarily hide current column (data preserved)
455
+ - `H` - Restore all hidden columns
456
+
457
+ **Freeze Rows and Columns** (`+`):
458
+ - Toggle frozen rows and/or columns to keep important headers and fields visible while scrolling
459
+
460
+ **Thousand Separator Toggle** (`,`):
461
+ - Applies to **integer** and **float** columns
462
+ - Formats large numbers with commas for readability (e.g., `1000000` → `1,000,000`)
463
+ - Works across all numeric columns in the table
464
+ - Toggle on/off as needed for different viewing preferences
465
+ - Display-only: does not modify underlying data in the dataframe
466
+
467
+ **Cursor Type Cycling** (`K`):
468
+ - Cycles through cell, row, and column selection modes
469
+ - Use it to switch between inspecting a single cell, an entire row, or an entire column
441
470
 
442
471
  ### 2. Row Detail View
443
472
 
444
473
  Press `Enter` on any row to open a modal showing all column values for that row.
445
- Useful for examining wide datasets where columns don't fit well on screen.
474
+ Useful for examining wide table where columns don't fit well on screen.
475
+
476
+ ![Row detail](https://raw.githubusercontent.com/need47/dataframe-textual/refs/heads/main/row-detail.png)
446
477
 
447
478
  **In the Row Detail Modal**:
448
- - Press `v` to **view** all rows containing the selected column value
449
- - Press `"` to **filter** all rows containing the selected column value to a new tab
479
+ - Press `v` to **filter** all rows containing the selected column value
480
+ - Press `"` to **collect** all rows containing the selected column value to a new tab
450
481
  - Press `{` to move to the previous row
451
482
  - Press `}` to move to the next row
452
483
  - Press `F` to show the frequency table for the selected column
@@ -458,11 +489,11 @@ Useful for examining wide datasets where columns don't fit well on screen.
458
489
 
459
490
  Press `Tab` in the main table to inspect the current cell in its own modal.
460
491
 
461
- You can also press `Tab` from the row-detail modal to drill into the selected field.
492
+ You can also press `Tab` from the Row Detail modal to drill into the selected field.
462
493
 
463
494
  Inside the cell-detail modal, press `Tab` again on the selected row/column to keep drilling into nested values.
464
495
 
465
- - Scalar values are shown directly
496
+ - Scalar values are displayed inline. For long text, press `Tab` again to view the full content in a multi-line modal.
466
497
  - String values are split into multiple rows using `|` by default
467
498
  - List-like values are expanded into a one-column table
468
499
  - Dict-like values are shown as key/value columns
@@ -470,7 +501,7 @@ Inside the cell-detail modal, press `Tab` again on the selected row/column to ke
470
501
 
471
502
  ### 4. Row Selection
472
503
 
473
- The application provides multiple modes for selecting rows (marks it for filtering or viewing):
504
+ The application provides multiple modes for selecting rows (marks it for filtering or collecting):
474
505
 
475
506
  - `\` - Select rows with cell matches or those matching cursor value in current column (respects data type)
476
507
  - `|` - Opens dialog to select rows with custom expression
@@ -483,8 +514,10 @@ The application provides multiple modes for selecting rows (marks it for filteri
483
514
  **Advanced Options**:
484
515
 
485
516
  When searching or finding, you can use checkboxes in the dialog to enable:
486
- - **Match Nocase**: Ignore case differences
487
- - **Match Whole**: Match complete value, not partial substrings or words
517
+ - Match option `Nocase` for case-insensitive matching
518
+ - Match option `Whole` to match full text
519
+ - Match option `Literal` to ignore special regex characters
520
+ - Match option `Reverse` to perform reverse match
488
521
 
489
522
  These options work with plain text searches. Use Polars regex patterns in expressions for more control. For example, use `(?i)` prefix in regex (e.g., `(?i)john`) for case-insensitive matching.
490
523
 
@@ -510,7 +543,11 @@ Replace values in current column (`r`) or across all columns (`R`).
510
543
  When you press `r` or `R`, enter:
511
544
  1. **Find term**: Value or expression to search for (done by string value)
512
545
  2. **Replace term**: Replacement value
513
- 3. **Matching options**: Match Nocase (ignore case), Match Whole (complete match only)
546
+ 3. **Matching options**:
547
+ - `Nocase` for case-insensitive matching
548
+ - `Whole` to match full text
549
+ - `Literal` to ignore special regex characters
550
+ - `Reverse` to perform reverse match
514
551
  4. **Replace mode**: All at once or interactive review
515
552
 
516
553
  **Replace All**:
@@ -523,34 +560,48 @@ When you press `r` or `R`, enter:
523
560
 
524
561
  **Tips:**
525
562
  - Search are done by string value (i.e., ignoring data type)
526
- - Type `NULL` to replace null/missing values
527
- - Use `Match Nocase` for case-insensitive matching
528
- - Use `Match Whole` to avoid partial replacements
563
+ - Type `NULL` to find or replace null values
529
564
  - Support undo (`u`)
530
565
 
531
- ### 6. View vs. Filter
566
+ ### 6. Filter & Collect
532
567
 
533
- Both operations show selected rows but with fundamentally different effects:
568
+ Both actions work on a subset of the original dataframe, but they serve different workflows.
534
569
 
535
- **When to use View** (`v` or `V`):
536
- - Exploring or analyzing data safely
537
- - Switching between different perspectives
538
- - Edits made in view mode are applied to the original dataframe
539
- - Press `q` to return to main table
540
- - Press `Ctrl+V` to save current view to a file. This does not affect the main table.
570
+ **Filtering options**:
541
571
 
542
- **When to use Filter** (`"`):
543
- - Cleaning data (removing unwanted rows)
544
- - Creating a trimmed dataset for export in a new tab
545
- - Edits are independent and do not affect the source dataframe
572
+ **Basic Filter** (`v`):
573
+ - Opens the chose subset as a derived view inside the current workflow
574
+ - Edits made in the filtered view still apply to the original dataframe
575
+ - Press `Ctrl+V` to save the current view to a file
576
+ - Press `q` to leave the filtered view and return to the main table
577
+ - Supports undo with `u`
546
578
 
547
- **Note**:
548
- - If currently there are no selected rows and no matching cells, the `v` (View) and `"` (Filter) will use cursor value for search.
549
- - Both support full undo with `u`.
579
+ **Advanced Filter** (`V`):
580
+ - Opens a dialog for value-based or expression-based filtering
581
+ - Useful when you want to define the subset directly
582
+
583
+ **Column Filter** (`f`):
584
+ - Opens a type-aware filter dialog for the current column
585
+ - Numeric columns support `=`, `!=`, `<`, `<=`, `>=`, and `>`
586
+ - String columns support exact match, prefix, suffix, contains, and regex matching
587
+ - Boolean columns support true, false, and null filtering
588
+ - Temporal columns support the same comparison operators as numeric columns
589
+ - List columns support exact-list matching and item membership checks such as "contains"
590
+
591
+ **Collect** (`"`):
592
+ - Creates a separate tab containing only the chosen rows
593
+ - The collected tab is independent from the source dataframe
594
+ - Edits in the collected tab do not modify the original table
595
+
596
+ For **Basic Filter** (`v`) and **Collect** (`"`), rows are chosen in this order:
597
+
598
+ - Use selected rows if any are present
599
+ - Otherwise, use rows with active matches from search or find
600
+ - Otherwise, use rows whose current-column value matches the current cell
550
601
 
551
602
  ### 7. [Polars Expressions](https://docs.pola.rs/api/python/stable/reference/expressions/index.html)
552
603
 
553
- Complex values or filters can be specified via Polars expressions, with the following adaptions for convenience:
604
+ Complex values, filters, and advanced operations can be specified via Polars expressions, with the following adaptions for convenience:
554
605
 
555
606
  **Column References:**
556
607
  - `$_` - Current column (based on cursor position)
@@ -561,6 +612,9 @@ Complex values or filters can be specified via Polars expressions, with the foll
561
612
  **Row References:**
562
613
  - `$#` - Current row index (1-based)
563
614
 
615
+ **DataFrame References:**
616
+ - `self` - Current dataframe
617
+
564
618
  **Basic Comparisons:**
565
619
  - `$_ > 50` - Current column greater than 50
566
620
  - `$salary >= 100000` - Salary at least 100,000
@@ -583,13 +637,14 @@ Complex values or filters can be specified via Polars expressions, with the foll
583
637
  - `~($status == 'inactive')` - Status is not inactive
584
638
  - `$revenue > $expenses` - Revenue exceeds expenses
585
639
  - ``$`product id` > 100`` - Product ID with spaces in column name greater than 100
640
+ - `self.drop(RID).is_duplicated()` - Duplicate rows (note: the internal RID column must be excluded)
586
641
 
587
- **String Matching:** ([Polars string API reference](https://docs.pola.rs/api/python/stable/reference/series/string.html))
642
+ **String Operations:** ([Polars string API reference](https://docs.pola.rs/api/python/stable/reference/series/string.html))
588
643
  - `$name.str.contains("John")` - Name contains "John" (case-sensitive)
589
644
  - `$name.str.contains("(?i)john")` - Name contains "john" (case-insensitive)
590
645
  - `$email.str.ends_with("@company.com")` - Email ends with domain
591
646
  - `$code.str.starts_with("ABC")` - Code starts with "ABC"
592
- - `$age.cast(pl.String).str.starts_with("7")` - Age (cast to string first) starts with "7"
647
+ - `$name.str.len_chars() < 7` - Length of name shorter than 7
593
648
 
594
649
  **Number Operations:**
595
650
  - `$age * 2 > 100` - Double age greater than 100
@@ -597,11 +652,12 @@ Complex values or filters can be specified via Polars expressions, with the foll
597
652
  - `$percentage >= 50` - Percentage at least 50%
598
653
 
599
654
  **Null Handling:**
600
- - `$column.is_null()` - Find null/missing values
655
+ - `$column.is_null()` - Find null values
601
656
  - `$column.is_not_null()` - Find non-null values
602
657
  - `NULL` - a value to represent null for convenience
603
658
 
604
659
  **Tips:**
660
+ - Use column indices (e.g., `$1`, `$2`) for faster column access.
605
661
  - Use column names that match exactly (case-sensitive)
606
662
  - Use parentheses to clarify complex expressions: `($a & $b) | ($c & $d)`
607
663
 
@@ -610,7 +666,7 @@ Complex values or filters can be specified via Polars expressions, with the foll
610
666
  - Press `[` to sort current column ascending
611
667
  - Press `]` to sort current column descending
612
668
  - Multi-column sorting supported (press multiple times on different columns)
613
- - Press same key twice to remove the column from sorting
669
+ - Press same key twice to remove the current column from sorting
614
670
 
615
671
  ### 9. Dataframe & Column Metadata
616
672
 
@@ -618,8 +674,9 @@ View quick metadata about your dataframe and columns to understand their structu
618
674
 
619
675
  **Dataframe Metadata** (`m`):
620
676
  - Press `m` to open a modal displaying:
621
- - **Row** - Total number of rows in the dataframe
622
- - **Column** - Total number of columns in the dataframe
677
+ - **File Name** - File name of current file
678
+ - **Row Count** - Total number of rows in the dataframe
679
+ - **Column Count** - Total number of columns in the dataframe
623
680
 
624
681
  **Column Metadata** (`M`):
625
682
  - Press `M` to open a modal displaying details for all columns:
@@ -639,15 +696,15 @@ Press `F` to see value distributions of the current column. The modal shows:
639
696
  - Value, Count, Percentage, Histogram
640
697
  - **Total row** at the bottom
641
698
 
642
- **In the Frequency Table**:
699
+ **In the Frequency Modal**:
643
700
  - Press `[` and `]` to sort by any column (value, count, or percentage)
644
- - Press `v` to **view** all rows containing the selected value
645
- - Press `"` to **filter** all rows containing the selected value to a new tab
646
- - Press `,` to toggle thousand separator
701
+ - Press `v` to **filter** all rows containing the selected value
702
+ - Press `"` to **collect** all rows containing the selected value to a new tab
703
+ - Press `,` to toggle thousand separator for numeric values
647
704
  - Press `g` to scroll to top
648
705
  - Press `G` to scroll to bottom
649
706
  - Press `Ctrl+S` to save the frequency table to file
650
- - Press `q` or `Escape` to close the frequency table
707
+ - Press `q` or `Escape` to close the modal
651
708
 
652
709
  This is useful for:
653
710
  - Understanding value distributions
@@ -662,9 +719,8 @@ Show summary statistics (count, null count, mean, median, std, min, max, etc.) u
662
719
  - `S` for all columns across the entire dataframe
663
720
 
664
721
  **In the Statistics Modal**:
665
- - Press `q` or `Escape` to close the statistics table
666
722
  - Use arrow keys to navigate
667
- - Useful for quick data validation and summary reviews
723
+ - Press `q` or `Escape` to close the modal
668
724
 
669
725
  This is useful for:
670
726
  - Understanding data distributions and characteristics
@@ -717,9 +773,11 @@ This is useful for:
717
773
  - Duplicate preserves all data from original row
718
774
  - Useful for batch adding similar records
719
775
 
720
- **Hide/Show Columns** (`h` / `H`):
721
- - `h` - Temporarily hide current column (data preserved)
722
- - `H` - Restore all hidden columns
776
+ **Remove Duplicate Rows** (`Ctrl+Delete`):
777
+ - Removes duplicated rows while keeping the first occurrence
778
+ - Compares row values across the visible columns
779
+ - Useful for quick deduplication before further editing, collecting, or exporting
780
+ - Supports undo with `u`
723
781
 
724
782
  ### 13. Column & Row Reordering
725
783
 
@@ -731,26 +789,25 @@ This is useful for:
731
789
  - Swaps adjacent rows
732
790
  - Reorder is preserved when saving
733
791
 
734
- ### 14. Freeze Rows and Columns
792
+ ### 14. Save File
735
793
 
736
- Press `f` to open the dialog:
737
- - Enter number of fixed rows and/or columns to keep top rows/columns visible while scrolling
794
+ The application provides separate save actions for the current tab, all tabs, and the current filtered view.
738
795
 
739
- ### 15. Thousand Separator Toggle
796
+ **Save Current Tab** (`Ctrl+T`):
797
+ - Saves the active tab to file
798
+ - Useful when you want to export only the dataframe you are currently working on
740
799
 
741
- Press `,` to toggle thousand separator formatting for numeric data:
742
- - Applies to **integer** and **float** columns
743
- - Formats large numbers with commas for readability (e.g., `1000000` → `1,000,000`)
744
- - Works across all numeric columns in the table
745
- - Toggle on/off as needed for different viewing preferences
746
- - Display-only: does not modify underlying data in the dataframe
747
- - State persists during the session
800
+ **Save All Tabs** (`Ctrl+S`):
801
+ - Saves every open tab to file
802
+ - Useful after editing multiple datasets in the same session
748
803
 
749
- ### 16. Save File
804
+ **Save Current View** (`Ctrl+V`):
805
+ - Saves only the current filtered or derived view to file
806
+ - Useful for exporting a subset without replacing the source dataframe
750
807
 
751
- Press `Ctrl+S` to save filtered, edited, or sorted data back to file. The output format is automatically determined by the file extension, making it easy to convert between different formats (e.g., CSV to TSV).
808
+ The output format is determined by the file extension, making it easy to convert between formats such as CSV, TSV, Parquet, or Excel.
752
809
 
753
- ### 17. Undo/Redo/Reset
810
+ ### 15. Undo/Redo/Reset
754
811
 
755
812
  **Undo** (`u`):
756
813
  - Reverts last action with full state restoration
@@ -768,7 +825,7 @@ Press `Ctrl+S` to save filtered, edited, or sorted data back to file. The output
768
825
  - Clears all edits, deletions, selections, filters, and sorts
769
826
  - Useful for starting fresh without reloading the file
770
827
 
771
- ### 18. Column Type Conversion
828
+ ### 16. Column Type Conversion
772
829
 
773
830
  Press the type conversion keys to instantly cast the current column to a different data type:
774
831
 
@@ -785,14 +842,7 @@ Press the type conversion keys to instantly cast the current column to a differe
785
842
 
786
843
  **Note**: Type conversion attempts to preserve data where possible. Conversions may lose data (e.g., float to int rounding).
787
844
 
788
- ### 19. Cursor Type Cycling
789
-
790
- Press `K` to cycle through selection modes:
791
- 1. **Cell mode**: Highlight individual cell (and its row/column headers)
792
- 2. **Row mode**: Highlight entire row
793
- 3. **Column mode**: Highlight entire column
794
-
795
- ### 20. SQL Interface
845
+ ### 17. SQL Interface
796
846
 
797
847
  The SQL interface provides two modes for querying your dataframe:
798
848
 
@@ -822,7 +872,7 @@ FROM self
822
872
  WHERE `product id` = 7
823
873
  ```
824
874
 
825
- ### 21. Clipboard Operations
875
+ ### 18. Clipboard Operations
826
876
 
827
877
  Copies value to system clipboard with `pbcopy` on macOS and `xclip` on Linux.
828
878
 
@@ -833,9 +883,9 @@ Copies value to system clipboard with `pbcopy` on macOS and `xclip` on Linux.
833
883
  - Press `Ctrl+R` to copy row values (delimited by tab)
834
884
  - Hold `Shift` to select with mouse
835
885
 
836
- ### 22. Link Column Creation
886
+ ### 19. Link Column Creation
837
887
 
838
- Press `@` to create a new column containing dynamically generated URLs using template.
888
+ Press `@` to create a new column containing dynamically generated URLs using template. Links are typically clickable in a terminal emulator using Ctrl+Click.
839
889
 
840
890
  **Template Placeholders:**
841
891
 
@@ -855,30 +905,56 @@ The link template supports multiple placeholder types for maximum flexibility:
855
905
  - Use full undo (`u`) if template produces unexpected URLs
856
906
  - For complex multi-column URLs, use column names (`$name`) for clarity over positions (`$1`)
857
907
 
858
- ### 23. Tab Management
859
-
860
- Manage multiple files and dataframes simultaneously with tabs.
861
-
862
- **Tab Operations:**
863
- - **`Ctrl+O`** - Open file in a new tab
864
- - **`b`** - Go to the next tab
865
- - **`B`** - Go to the previous tab
866
- - **`space`** - Toggle the tab bar visibility
867
- - **`>`** - Move the current tab right
868
- - **`<`** - Move the current tab left
869
- - **`Double-click`** - Rename the tab
870
- - **`Ctrl+D`** - Duplicate current tab (creates a copy with same data and state)
871
- - **`Ctrl+T`** - Save current tab to file
872
- - **`Ctrl+S`** - Save all tabs to file
873
- - **`w`** - Save current tab to file (overwrite without prompt)
874
- - **`W`** - Save all tabs to file (overwrite without prompt)
875
- - **`q`** - Close current tab (closes tab, prompts to save if unsaved changes)
876
- - **`Q`** - Close all tabs and exit app (prompts to save tabs with unsaved changes)
877
- - **`Ctrl+Q`** - Force to quit app regardless of unsaved changes
908
+ ### 20. Handling Loading Errors
878
909
 
879
- **Tips:**
880
- - Tabs with unsaved changes are indicated with a bright background
881
- - Closing or quitting a tab with unsaved changes triggers a save prompt
910
+ Most loading failures come from malformed CSV/TSV input, quoting issues, or mixed column types. When this happens, the application prints a hint with a suggested retry option.
911
+
912
+ **Common fixes:**
913
+ - Use `-Q` if quote characters are mismatched, improperly escaped, or should be ignored entirely
914
+ - Use `-T` when rows contain more fields than expected and you want to truncate ragged lines
915
+ - Use `-L` to increase the number of rows used for schema inference when early rows do not represent the full column types
916
+ - Use `-I` to disable type inference and read CSV/TSV values as strings
917
+ - Check the delimiter and format options if the input appears empty or unreadable
918
+ - Use `-E` as a last resort to ignore recoverable parsing errors
919
+
920
+ **Typical cases:**
921
+
922
+ **Malformed CSV or broken quoting**:
923
+ - Symptom: errors mentioning malformed CSV, mismatched quotes, or improperly escaped fields
924
+ - Try: `-Q` to disable quoting or choose a different quote character
925
+
926
+ **Ragged lines or inconsistent field counts**:
927
+ - Symptom: errors saying the input has more fields than defined in the schema
928
+ - Try: `-T` to truncate ragged lines
929
+
930
+ **Mixed data types in one column**:
931
+ - Symptom: errors saying a value could not be parsed as an integer, float, or other inferred type at a specific column
932
+ - Try: `-L` first, then `-I` if the column is genuinely mixed
933
+
934
+ **No data could be loaded**:
935
+ - Symptom: errors indicating that no data was available to load
936
+ - Check: whether the file is empty, the format is correct, and the delimiter matches the input
937
+
938
+ **Fallback option**:
939
+ - If none of the above helps and the file is mostly usable, retry with `-E` to ignore parsing errors
940
+
941
+ **Examples:**
942
+ ```bash
943
+ # Disable quote handling when CSV quoting is broken
944
+ dv bad.csv -Q
945
+
946
+ # Truncate ragged lines
947
+ dv messy.tsv -T
948
+
949
+ # Increase schema inference depth
950
+ dv mixed_types.csv -L 1000
951
+
952
+ # Disable type inference entirely
953
+ dv mixed_types.csv -I
954
+
955
+ # Ignore recoverable parsing errors
956
+ dv partially_broken.csv -E
957
+ ```
882
958
 
883
959
  ## Dependencies
884
960