dataframe-textual 1.5.0__py3-none-any.whl → 1.10.1__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataframe-textual
3
- Version: 1.5.0
3
+ Version: 1.10.1
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
@@ -49,20 +49,6 @@ A powerful, interactive terminal-based viewer/editor for CSV/TSV/Excel/Parquet/J
49
49
  - 🚀 **Fast Loading** - Powered by Polars for efficient data handling
50
50
  - 🎨 **Rich Terminal UI** - Beautiful, color-coded columns with various data types (e.g., integer, float, string)
51
51
  - ⌨️ **Comprehensive Keyboard Navigation** - Intuitive controls
52
- # Skip first 5 lines (comments, metadata)
53
- dv -l 5 data_with_metadata.csv
54
-
55
- # Skip 1 row after header (e.g., units row)
56
- dv -a 1 data_with_units.csv
57
-
58
- # Complex CSV with comments and units row
59
- dv -l 3 -a 1 -I messy_scientific_data.csv
60
-
61
- # Combine all options: skip lines, skip after header, no header, no inference, gzipped
62
- dv -l 2 -a 1 -H -I complex_data.csv.gz
63
-
64
- # Process compressed data from stdin with line skipping
65
- zcat compressed_data.csv.gz | dv -f csv -l 2editing, and manipulating data
66
52
  - 📊 **Flexible Input** - Read from files and/or stdin (pipes/redirects)
67
53
  - 🔄 **Smart Pagination** - Lazy load rows on demand for handling large datasets
68
54
 
@@ -76,7 +62,8 @@ zcat compressed_data.csv.gz | dv -f csv -l 2editing, and manipulating data
76
62
  ### Advanced Features
77
63
  - 📂 **Multi-File Support** - Open multiple files in separate tabs
78
64
  - 🔄 **Tab Management** - Seamlessly switch between open files with keyboard shortcuts
79
- - 📌 **Freeze Rows/Columns** - Keep important rows and columns visible while scrolling
65
+ - **Duplicate Tab** - Create a copy of the current tab with the same data
66
+ - �📌 **Freeze Rows/Columns** - Keep important rows and columns visible while scrolling
80
67
  - 🎯 **Cursor Type Cycling** - Switch between cell, row, and column selection modes
81
68
  - 🔗 **Link Column Creation** - Generate clickable URLs using template expressions with placeholder support
82
69
 
@@ -141,16 +128,15 @@ python main.py pokemon.csv
141
128
  # Or with uv
142
129
  uv run python main.py pokemon.csv
143
130
 
144
- # Read from stdin (auto-detects format; defaults to TSV if not recognized)
131
+ # Read from stdin (defaults to TSV)
145
132
  cat data.tsv | dv
146
133
  dv < data.tsv
147
134
 
148
- # Gzipped files are supported
149
- dv data.csv.gz
150
- dv large_dataset.tsv.gz
151
-
152
135
  # Specify format for gzipped stdin
153
136
  zcat data.csv.gz | dv -f csv
137
+
138
+ # Gzipped files are supported
139
+ dv data.csv.gz
154
140
  ```
155
141
 
156
142
  ### Multi-File Usage - Multiple Tabs
@@ -162,24 +148,22 @@ dv file1.csv file2.csv file3.csv
162
148
  # Open multiple sheets in tabs in an Excel file
163
149
  dv file.xlsx
164
150
 
165
- # Mix files and stdin (read from stdin, then open file)
151
+ # Mix files and stdin
166
152
  dv data1.tsv < data2.tsv
167
-
168
- # Mix regular and gzipped files
169
- dv data1.csv data2.csv.gz data3.tsv.gz
170
153
  ```
171
154
 
172
155
  When multiple files are opened:
173
- - Each file appears as a separate tab at the top
174
- - Switch between tabs using `>` (next) or `<` (previous)
156
+ - Each file appears as a separate tab
157
+ - Switch between tabs using `>` (next) or `<` (previous), or use `b` for cycling tabs
158
+ - Save current tab or all tabs with `Ctrl+S`
159
+ - Duplicate the current tab with `Ctrl+D`
175
160
  - Open additional files with `Ctrl+O`
176
- - Close the current tab with `Ctrl+W`
177
161
  - Each file maintains its own state (edits, sort order, selections, history, etc.)
178
162
 
179
163
  ## Command Line Options
180
164
 
181
165
  ```
182
- usage: dv [-h] [-f {csv,excel,tsv,parquet,json,ndjson}] [-H] [-I] [-E] [-c COMMENT_PREFIX] [-q QUOTE_CHAR] [-l SKIP_LINES] [-a SKIP_ROWS_AFTER_HEADER] [-u NULL [NULL ...]] [files ...]
166
+ usage: dv [-h] [-f {csv,excel,tsv,parquet,json,ndjson}] [-H] [-I] [-E] [-c COMMENT_PREFIX] [-q QUOTE_CHAR] [-l SKIP_LINES] [-a SKIP_ROWS_AFTER_HEADER] [-n NULL [NULL ...]] [files ...]
183
167
 
184
168
  Interactive terminal based viewer/editor for tabular data (e.g., CSV/Excel).
185
169
 
@@ -201,14 +185,14 @@ options:
201
185
  Skip lines when reading CSV/TSV (default: 0)
202
186
  -a, --skip-rows-after-header SKIP_ROWS_AFTER_HEADER
203
187
  Skip rows after header when reading CSV/TSV (default: 0)
204
- -u, --null NULL [NULL ...]
188
+ -n, --null NULL [NULL ...]
205
189
  Values to interpret as null values when reading CSV/TSV
206
190
  ```
207
191
 
208
192
  ### CLI Examples
209
193
 
210
194
  ```bash
211
- # View CSV file without header row
195
+ # View headless CSV file
212
196
  dv -H data_no_header.csv
213
197
 
214
198
  # Disable type inference for faster loading
@@ -217,44 +201,30 @@ dv -I large_data.csv
217
201
  # Ignore parsing errors in malformed CSV
218
202
  dv -E data_with_errors.csv
219
203
 
220
- # Skip first 3 lines of file (e.g., comments, metadata)
221
- dv -l 3 data_with_comments.csv
204
+ # Skip first 3 lines of file (e.g., metadata)
205
+ dv -l 3 data_with_meta.csv
222
206
 
223
207
  # Skip 1 row after header (e.g., units row)
224
208
  dv -a 1 data_with_units.csv
225
209
 
226
- # Treat specific values as null/missing (e.g., 'NA', 'N/A', '-')
227
- dv -u NA N/A - data.csv
228
-
229
- # Multiple null values with different formats
230
- dv -u NULL NA "" "Not Available" messy_data.csv
210
+ # CSV with comment lines
211
+ dv -c "#" commented_data.csv
231
212
 
232
- # Disable quote character processing for TSV with embedded quotes
233
- dv -q "" data.tsv
213
+ # Treat specific values as null/missing (e.g., 'NA', 'N/A', '-')
214
+ dv -n NA N/A - data.csv
234
215
 
235
216
  # Use different quote character (e.g., single quote for CSV)
236
217
  dv -q "'" data.csv
237
218
 
219
+ # Disable quote character processing for TSV with embedded quotes
220
+ dv -q data.tsv
221
+
238
222
  # Complex CSV with comments and units row
239
223
  dv -l 3 -a 1 -I messy_scientific_data.csv
240
224
 
241
- # Combine all options: skip lines, skip after header, no header, no inference, gzipped
242
- dv -l 2 -a 1 -H -I complex_data.csv.gz
243
-
244
- # Process compressed data from stdin with line skipping
245
- zcat compressed_data.csv.gz | dv -f csv -l 2
246
-
247
- # CSV with custom null values and no header
248
- dv -H -u NA "N/A" "-" raw_data.csv
249
-
250
- # Skip lines, specify null values, and disable type inference
251
- dv -l 5 -u NA "" data_with_metadata.csv
252
-
253
- # TSV file with problematic quotes in data fields
254
- dv -q None data.tsv
255
-
256
- # CSV with comment lines and custom null values
257
- dv -c "#" -u NA "N/A" commented_data.csv
225
+ # Process compressed data
226
+ dv data.csv.gz
227
+ zcat compressed_data.csv.gz | dv -f csv
258
228
  ```
259
229
 
260
230
  ## Keyboard Shortcuts
@@ -265,13 +235,17 @@ dv -c "#" -u NA "N/A" commented_data.csv
265
235
 
266
236
  | Key | Action |
267
237
  |-----|--------|
268
- | `Ctrl+O` | Open file in a new tab |
269
- | `Ctrl+W` | Close current tab |
270
- | `Ctrl+A` | Save all open tabs to Excel file |
271
- | `>` or `b` | Move to next tab |
238
+ | `>` | Move to next tab |
272
239
  | `<` | Move to previous tab |
240
+ | `b` | Cycle through tabs |
273
241
  | `B` | Toggle tab bar visibility |
274
- | `q` | Quit the application |
242
+ | `q` | Close current tab (prompts to save unsaved changes) |
243
+ | `Q` | Close all tabs and app (prompts to save unsaved changes) |
244
+ | `Ctrl+Q` | Force to quit app (regardless off unsaved changes) |
245
+ | `Ctrl+S` | Save current tab or all tabs to file |
246
+ | `Ctrl+D` | Duplicate current tab |
247
+ | `Ctrl+O` | Open file in a new tab |
248
+ | `Double-click tab` | Rename current tab |
275
249
 
276
250
  #### View & Settings
277
251
 
@@ -292,23 +266,30 @@ dv -c "#" -u NA "N/A" commented_data.csv
292
266
  | `G` | Jump to last row (loads all remaining rows) |
293
267
  | `↑` / `↓` | Move up/down one row |
294
268
  | `←` / `→` | Move left/right one column |
295
- | `Home` / `End` | Jump to first/last column in current row |
296
- | `Ctrl + Home` / `Ctrl + End` | Jump to top/bottom in current page |
269
+ | `Home` / `End` | Jump to first/last column |
270
+ | `Ctrl + Home` / `Ctrl + End` | Jump to page top/bottom |
297
271
  | `PageDown` / `PageUp` | Scroll down/up one page |
298
272
  | `Ctrl+F` | Page down |
299
273
  | `Ctrl+B` | Page up |
300
274
 
275
+ #### Undo/Redo/Reset
276
+ | `u` | Undo last action |
277
+ | `U` | Redo last undone action |
278
+ | `Ctrl+U` | Reset to initial state |
279
+
301
280
  #### Viewing & Display
302
281
 
303
282
  | Key | Action |
304
283
  |-----|--------|
305
- | `Enter` | View full details of current row in modal |
306
- | `F` | Show frequency distribution for column |
284
+ | `Enter` | Record view of current row |
285
+ | `F` | Show frequency distribution for current column |
307
286
  | `s` | Show statistics for current column |
308
287
  | `S` | Show statistics for entire dataframe |
309
- | `K` | Cycle cursor type: cell → row → column → cell |
288
+ | `K` | Cycle cursor types: cell → row → column → cell |
310
289
  | `~` | Toggle row labels |
311
290
  | `_` (underscore) | Expand column to full width |
291
+ | `z` | Freeze rows and columns |
292
+ | `,` | Toggle thousand separator for numeric display |
312
293
 
313
294
  #### Data Editing
314
295
 
@@ -320,11 +301,11 @@ dv -c "#" -u NA "N/A" commented_data.csv
320
301
  | `E` | Edit entire column with expression |
321
302
  | `a` | Add empty column after current |
322
303
  | `A` | Add column with name and value/expression |
323
- | `@` | Add a link column from template expression |
304
+ | `@` | Add a link column from template |
324
305
  | `-` (minus) | Delete current column |
325
306
  | `x` | Delete current row |
326
- | `X` | Delete current row and all rows below |
327
- | `Ctrl+X` | Delete current row and all rows above |
307
+ | `X` | Delete current row and all those below |
308
+ | `Ctrl+X` | Delete current row and all those above |
328
309
  | `d` | Duplicate current column (appends '_copy' suffix) |
329
310
  | `D` | Duplicate current row |
330
311
  | `h` | Hide current column |
@@ -336,25 +317,25 @@ dv -c "#" -u NA "N/A" commented_data.csv
336
317
  |-----|--------|
337
318
  | `\` | Search in current column using cursor value and select rows |
338
319
  | `\|` (pipe) | Search in current column with expression and select rows |
320
+ | `{` | Go to previous selected row |
321
+ | `}` | Go to next selected row |
339
322
  | `/` | Find in current column with cursor value and highlight matches |
340
323
  | `?` | Find in current column with expression and highlight matches |
341
324
  | `n` | Go to next match |
342
325
  | `N` | Go to previous match |
343
- | `{` | Go to previous selected row |
344
- | `}` | Go to next selected row |
345
326
  | `'` | Select/deselect current row |
346
- | `t` | Toggle selected rows (invert) |
327
+ | `t` | Toggle selected rows (invßert) |
347
328
  | `T` | Clear all selected rows and/or matches |
348
- | `"` (quote) | Filter to selected rows only |
349
- | `v` | View only rows by selected rows and/or matches or cursor value |
350
- | `V` | View only rows by expression |
329
+ | `"` (quote) | Filter to selected rows and remove others |
330
+ | `v` | View only rows (and hide others) by selected rows and/or matches or cursor value |
331
+ | `V` | View only rows (and hide others) by expression |
351
332
 
352
333
  #### SQL Interface
353
334
 
354
335
  | Key | Action |
355
336
  |-----|--------|
356
- | `l` | Simple SQL interface (select columns & WHERE clause) |
357
- | `L` | Advanced SQL interface (full SQL queries) |
337
+ | `l` | Simple SQL interface (select columns & where clause) |
338
+ | `L` | Advanced SQL interface (full SQL query with syntax highlight) |
358
339
 
359
340
  #### Find & Replace
360
341
 
@@ -381,7 +362,7 @@ dv -c "#" -u NA "N/A" commented_data.csv
381
362
  | `Shift+←` | Move current column left |
382
363
  | `Shift+→` | Move current column right |
383
364
 
384
- #### Type Conversion
365
+ #### Type Casting
385
366
 
386
367
  | Key | Action |
387
368
  |-----|--------|
@@ -390,19 +371,14 @@ dv -c "#" -u NA "N/A" commented_data.csv
390
371
  | `!` | Cast current column to boolean |
391
372
  | `$` | Cast current column to string |
392
373
 
393
- #### Data Management
374
+ #### Copy & Save
394
375
 
395
376
  | Key | Action |
396
377
  |-----|--------|
397
- | `z` | Freeze rows and columns |
398
- | `,` | Toggle thousand separator for numeric display |
399
378
  | `c` | Copy current cell to clipboard |
400
379
  | `Ctrl+C` | Copy column to clipboard |
401
380
  | `Ctrl+R` | Copy row to clipboard (tab-separated) |
402
381
  | `Ctrl+S` | Save current tab to file |
403
- | `u` | Undo last action |
404
- | `U` | Redo last undone action |
405
- | `Ctrl+U` | Reset to initial state |
406
382
 
407
383
  ## Features in Detail
408
384
 
@@ -418,34 +394,34 @@ Columns are automatically styled based on their data type:
418
394
  ### 2. Row Detail View
419
395
 
420
396
  Press `Enter` on any row to open a modal showing all column values for that row.
421
- Useful for examining wide datasets where columns don't fit on screen.
397
+ Useful for examining wide datasets where columns don't fit well on screen.
422
398
 
423
399
  **In the Row Detail Modal**:
424
- - Press `v` to **view** the main table to show only rows with the selected column value
425
- - Press `"` to **filter** all rows containing the selected column value
400
+ - Press `v` to **view** all rows containing the selected column value (and hide others)
401
+ - Press `"` to **filter** all rows containing the selected column value (and remove others)
426
402
  - Press `q` or `Escape` to close the modal
427
403
 
428
404
  ### 3. Search & Filtering
429
405
 
430
406
  The application provides multiple search modes for different use cases:
431
407
 
432
- **Search Operations** - Direct value/expression matching in current column:
433
- - **`|` - Column Expression Search**: Opens dialog to search current column with custom expression
434
- - **`\` - Column Cursor Search**: Instantly search current column using the cursor value
408
+ **Search Operations** - Search by value/expression in current column and select rows:
409
+ - **`\` - Column Cursor Search**: Search cursor value
410
+ - **`|` - Column Expression Search**: Opens dialog to search with custom expression
435
411
 
436
- **Find Operations** - Find by value/expression:
412
+ **Find Operations** - Find by value/expression and highlight matches:
437
413
  - **`/` - Column Find**: Find cursor value within current column
438
414
  - **`?` - Column Expression Find**: Open dialog to search current column with expression
439
415
  - **`;` - Global Find**: Find cursor value across all columns
440
416
  - **`:` - Global Expression Find**: Open dialog to search all columns with expression
441
417
 
442
418
  **Selection & Filtering**:
443
- - **`'` - Toggle Row Selection**: Select/deselect current row (marks it for filtering)
444
- - **`t` - Invert Selections**: Flip selection state of all rows at once
419
+ - **`'` - Toggle Row Selection**: Select/deselect current row (marks it for filtering or viewing)
420
+ - **`t` - Invert Selections**: Flip selections of all rows
445
421
  - **`T` - Clear Selections**: Remove all row selections and matches
446
- - **`"` - Filter Selected**: Display only the selected rows and remove others
447
- - **`v` - View by Value**: Filter/view rows by selected rows or cursor value (others hidden but preserved)
448
- - **`V` - View by Expression**: Filter/view rows using custom Polars expression (others hidden but preserved)
422
+ - **`"` - Filter Selected**: View only the selected rows (others removed)
423
+ - **`v` - View by Value**: View rows by selected rows or cursor value (others hidden but preserved)
424
+ - **`V` - View by Expression**: View rows using custom expression (others hidden but preserved)
449
425
 
450
426
  **Advanced Matching Options**:
451
427
 
@@ -459,7 +435,7 @@ These options work with plain text searches. Use Polars regex patterns in expres
459
435
 
460
436
  **Quick Tips:**
461
437
  - Search results highlight matching rows/cells in **red**
462
- - Multiple searches **accumulate selections** - each new search adds to the selections
438
+ - Multiple searches **accumulate** - each new search adds to the selections or matches
463
439
  - Type-aware matching automatically converts values. Resort to string comparison if conversion fails
464
440
  - Use `u` to undo any search or filter
465
441
 
@@ -495,46 +471,9 @@ When you press `r` or `R`, a dialog opens where you can enter:
495
471
  - `Enter` or press the `Yes` button - **Replace this occurrence** and move to next
496
472
  - Press the `Skip` button - **Skip this occurrence** and move to next
497
473
  - `Escape` or press the `No` button - **Cancel** remaining replacements (but keep already-made replacements)
498
- - Displays progress: `Occurrence X of Y` (Y = total matches, X = current)
499
- - Shows the value that will be replaced and what it will become
474
+ - Displays progress: `Occurrence X of Y` (Y = total occurrences, X = current)
500
475
  - Useful for careful replacements where you want to review each change
501
476
 
502
- **Search Term Types:**
503
- - **Plain text**: Exact string match (e.g., "John" finds "John")
504
- - Use **Match Nocase** checkbox to match regardless of case (e.g., find "john", "John", "JOHN")
505
- - Use **Match Whole** checkbox to match complete words only (e.g., find "cat" but not in "catfish")
506
- - **NULL**: Replace null/missing values (type `NULL`)
507
- - **Expression**: Polars expressions for complex matching (e.g., `$_ > 50` for column replace)
508
- - **Regex patterns**: Use Polars regex syntax for advanced matching
509
- - Case-insensitive: Use `(?i)` prefix (e.g., `(?i)john`)
510
- - Whole word: Use `\b` boundary markers (e.g., `\bjohn\b`)
511
-
512
- **Examples:**
513
-
514
- ```
515
- Find: "John"
516
- Replace: "Jane"
517
- → All occurrences of "John" become "Jane"
518
-
519
- Find: "john"
520
- Replace: "jane"
521
- Match Nocase: ✓ (checked)
522
- → "John", "JOHN", "john" all become "jane"
523
-
524
- Find: "cat"
525
- Replace: "dog"
526
- Match Whole: ✓ (checked)
527
- → "cat" becomes "dog", but "catfish" is not matched
528
-
529
- Find: "NULL"
530
- Replace: "Unknown"
531
- → All null/missing values become "Unknown"
532
-
533
- Find: "(?i)active" # Case-insensitive
534
- Replace: "inactive"
535
- → "Active", "ACTIVE", "active" all become "inactive"
536
- ```
537
-
538
477
  **For Global Replace (`R`)**:
539
478
  - Searches and replaces across all columns simultaneously
540
479
  - Each column can have different matching behavior (string matching for text, numeric for numbers)
@@ -550,6 +489,7 @@ Replace: "inactive"
550
489
  - **Flexible matching**: Support for case-insensitive and whole-word matching
551
490
 
552
491
  **Tips:**
492
+ - **NULL**: Replace null/missing values (type `NULL`)
553
493
  - Use interactive mode for one-time replacements to be absolutely sure
554
494
  - Use "Replace All" for routine replacements (e.g., fixing typos, standardizing formats)
555
495
  - Use **Match Nocase** for matching variations of names or titles
@@ -591,7 +531,7 @@ Complex values or filters can be specified via Polars expressions, with the foll
591
531
  - `~($status == 'inactive')` - Status is not inactive
592
532
  - `$revenue > $expenses` - Revenue exceeds expenses
593
533
 
594
- **String Matching:**
534
+ **String Matching:** ([Polars string API reference](https://docs.pola.rs/api/python/stable/reference/series/string.html))
595
535
  - `$name.str.contains("John")` - Name contains "John" (case-sensitive)
596
536
  - `$name.str.contains("(?i)john")` - Name contains "john" (case-insensitive)
597
537
  - `$email.str.ends_with("@company.com")` - Email ends with domain
@@ -621,17 +561,14 @@ Complex values or filters can be specified via Polars expressions, with the foll
621
561
 
622
562
  ### 6. Frequency Distribution
623
563
 
624
- Press `F` to see how many times each value appears in the current column. The modal shows:
625
- - Value
626
- - Count
627
- - Percentage
628
- - Histogram
564
+ Press `F` to see value distributions of the current column. The modal shows:
565
+ - Value, Count, Percentage, Histogram
629
566
  - **Total row** at the bottom
630
567
 
631
568
  **In the Frequency Table**:
632
569
  - Press `[` and `]` to sort by any column (value, count, or percentage)
633
- - Press `v` to **filter** the main table to show only rows with the selected value
634
- - Press `"` to **exclude** all rows except those containing the selected value
570
+ - Press `v` to **filter** all rows with the selected value (others hidden but preserved)
571
+ - Press `"` to **exclude** all rows containing the selected value (others removed)
635
572
  - Press `q` or `Escape` to close the frequency table
636
573
 
637
574
  This is useful for:
@@ -647,12 +584,10 @@ Press `s` to see summary statistics for the current column, or press `S` for sta
647
584
  **Column Statistics** (`s`):
648
585
  - Shows calculated statistics using Polars' `describe()` method
649
586
  - Displays: count, null count, mean, median, std, min, max, etc.
650
- - Values are color-coded according to their data type
651
- - Statistics label column has no styling for clarity
652
587
 
653
588
  **Dataframe Statistics** (`S`):
654
589
  - Shows statistics for all numeric and applicable columns simultaneously
655
- - Data columns are color-coded by their data type (integer, float, string, etc.)
590
+ - Displays: count, null count, mean, median, std, min, max, etc.
656
591
 
657
592
  **In the Statistics Modal**:
658
593
  - Press `q` or `Escape` to close the statistics table
@@ -688,15 +623,7 @@ This is useful for:
688
623
  - Useful for removing leading rows or the beginning of a dataset
689
624
 
690
625
  **Delete Column** (`-`):
691
- - Removes the entire column from view and dataframe
692
-
693
- **Delete Column and After** (`_`):
694
- - Deletes the current column and all columns to the right
695
- - Useful for removing trailing columns or the end of a dataset
696
-
697
- **Delete Column and Before** (`Ctrl+-`):
698
- - Deletes the current column and all columns to the left
699
- - Useful for removing leading columns or the beginning of a dataset
626
+ - Removes the entire column from display and dataframe
700
627
 
701
628
  ### 9. Hide & Show Columns
702
629
 
@@ -708,10 +635,6 @@ This is useful for:
708
635
  **Show Hidden Rows/Columns** (`H`):
709
636
  - Restores all previously hidden rows/columns to the display
710
637
 
711
- This is useful for:
712
- - Focusing on specific columns without deleting data
713
- - Temporarily removing cluttered or unnecessary columns
714
-
715
638
  ### 10. Duplicate Column
716
639
 
717
640
  Press `d` to duplicate the current column:
@@ -826,6 +749,7 @@ Execute complete SQL queries for advanced data manipulation:
826
749
  - Support for JOINs, GROUP BY, aggregations, and more
827
750
  - Access to all SQL capabilities for complex transformations
828
751
  - Always use `self` as the table name
752
+ - Syntax highlighted
829
753
 
830
754
  **Examples:**
831
755
  ```sql
@@ -846,15 +770,16 @@ WHERE (age > 25 AND salary > 50000) OR department = 'Management'
846
770
  ### 19. Clipboard Operations
847
771
 
848
772
  Copies value to system clipboard with `pbcopy` on macOS and `xclip` on Linux
773
+ **Note** May require a X server to work
849
774
 
850
- Press `Ctrl+C` to copy:
851
775
  - Press `c` to copy cursor value
852
776
  - Press `Ctrl+C` to copy column values
853
777
  - Press `Ctrl+R` to copy row values (delimited by tab)
778
+ - Hold `Shift` to select with mouse
854
779
 
855
780
  ### 20. Link Column Creation
856
781
 
857
- Press `@` to create a new column containing dynamically generated URLs using template expressions.
782
+ Press `@` to create a new column containing dynamically generated URLs using template.
858
783
 
859
784
  **Template Placeholders:**
860
785
 
@@ -862,111 +787,47 @@ The link template supports multiple placeholder types for maximum flexibility:
862
787
 
863
788
  - **`$_`** - Current column (the column where cursor was when `@` was pressed)
864
789
  - Example: `https://example.com/search/$_` - Uses values from the current column
865
- - Useful for quick links based on the focused column
866
790
 
867
791
  - **`$1`, `$2`, `$3`, etc.** - Column by 1-based position index
868
792
  - Example: `https://example.com/product/$1/details/$2` - Uses 1st and 2nd columns
869
- - Useful for structured templates spanning multiple columns
870
793
  - Index corresponds to column display order (left-to-right)
871
794
 
872
795
  - **`$name`** - Column by name (use actual column names)
873
796
  - Example: `https://pubchem.ncbi.nlm.nih.gov/search?q=$product_id` - Uses `product_id` column
874
797
  - Example: `https://example.com/$region/$city/data` - Uses `region` and `city` columns
875
- - Useful for readable, self-documenting templates
876
798
 
877
799
  **Features:**
878
-
879
- - **Vectorized Expression**: All rows processed efficiently using Polars' vectorized operations
880
- - **Type Casting**: Column values automatically converted to strings for URL construction
881
800
  - **Multiple Placeholders**: Mix and match placeholders in a single template
882
801
  - **URL Prefix**: Automatically prepends `https://` if URL doesn't start with `http://` or `https://`
883
- - **PubChem Support**: Special shorthand - replace `PC` with full PubChem URL
884
-
885
- **Examples:**
886
-
887
- ```
888
- Template: https://example.com/$_
889
- Current column: product_id
890
- Result: https://example.com/ABC123 (for each row's product_id value)
891
-
892
- Template: https://database.org/view?id=$1&lang=$2
893
- Column 1: item_code, Column 2: language
894
- Result: https://database.org/view?id=X001&lang=en
895
-
896
- Template: https://example.com/$username/profile
897
- Column: username (must exist in dataframe)
898
- Result: https://example.com/john_doe/profile
899
-
900
- Template: https://example.com/$region/$city
901
- Columns: region, city
902
- Result: https://example.com/north/seattle
903
-
904
- Template: PC/compound/$1
905
- Column 1: pubchem_cid
906
- Result: https://pubchem.ncbi.nlm.nih.gov/compound/12345
907
- ```
908
-
909
- **Error Handling:**
910
-
911
- - **Invalid column index**: `$5` when only 3 columns exist → Error message showing valid range
912
- - **Non-existent column name**: `$invalid_column` → Error message with available columns
913
- - **No placeholders**: Template treated as constant → All rows get identical URL
914
802
 
915
803
  **Tips:**
916
-
917
- - Use descriptive column names for `$name` placeholders to make templates self-documenting
918
- - Test with a small dataset first to verify template correctness
919
804
  - Use full undo (`u`) if template produces unexpected URLs
920
805
  - For complex multi-column URLs, use column names (`$name`) for clarity over positions (`$1`)
921
806
 
922
- ## Examples
807
+ ### 21. Tab Management
923
808
 
924
- ### Single File Examples
809
+ Manage multiple files and dataframes simultaneously with tabs.
925
810
 
926
- ```bash
927
- # View Pokemon dataset
928
- dv pokemon.csv
811
+ **Tab Operations:**
812
+ - **`Ctrl+O`** - Open file in a new tab
813
+ - **`>`** - Move to next tab
814
+ - **`<`** - Move to previous tab
815
+ - **`b`** - Cycle through tabs
816
+ - **`B`** - Toggle tab bar visibility
817
+ - **`Double-click tab`** - Rename the tab
818
+ - **`Ctrl+D`** - Duplicate current tab (creates a copy with same data and state)
819
+ - **`Ctrl+S`** - Save current tab to file or all tabs in a single Excel file
820
+ - **`q`** - Close current tab (closes tab, prompts to save if unsaved changes)
821
+ - **`Q`** - Close all tabs and exit app (prompts to save tabs with unsaved changes)
822
+ - **`Ctrl+Q`** - Force to quit app regardless of unsaved changes
929
823
 
930
- # Chain with other command and specify input file format
931
- cut -d',' -f1,2,3 pokemon.csv | dv -f csv
824
+ **Tab Operations:**
932
825
 
933
- # Work with gzipped files
934
- dv large_dataset.csv.gz
826
+ **Saving & Quitting:**
935
827
 
936
- # CSV file without header row
937
- dv -H raw_data.csv
938
-
939
- # Skip type inference for faster loading
940
- dv -I huge_file.csv
941
-
942
- # Skip first 5 lines (comments, metadata)
943
- dv -L 5 data_with_metadata.csv
944
-
945
- # Skip 1 row after header (units row)
946
- dv -K 1 data_with_units.csv
947
-
948
- # Complex CSV with comments and units row
949
- dv -L 3 -K 1 -I messy_scientific_data.csv
950
-
951
- # Combine all options: skip lines, skip after header, no header, no inference, gzipped
952
- dv -L 2 -K 1 -H -I complex_data.csv.gz
953
-
954
- # Process compressed data from stdin with line skipping
955
- zcat compressed_data.csv.gz | dv -f csv -L 2
956
- ```
957
-
958
- ### Multi-File/Tab Examples
959
-
960
- ```bash
961
- # Open multiple sheets as tabs in a single Excel
962
- dv sales.xlsx
963
-
964
- # Open multiple files as tabs (including gzipped)
965
- dv pokemon.csv titanic.csv large_data.csv.gz
966
-
967
- # Start with one file, then open others using Ctrl+O
968
- dv initial_data.csv
969
- ```
828
+ **Tips:**
829
+ - Tabs with unsaved changes are highlighted with a bright border
830
+ - Closing or quitting a tab with unsaved changes triggers a save prompt
970
831
 
971
832
  ## Dependencies
972
833
 
@@ -0,0 +1,14 @@
1
+ dataframe_textual/__init__.py,sha256=IFPb8RMUgghw0eRomehkkC684Iny_gs1VkiZMQ5ZpFk,813
2
+ dataframe_textual/__main__.py,sha256=VRH80gWJGLxfURg1GiN3cwWI7O_TQM5PqhqXbUCC1bg,3253
3
+ dataframe_textual/common.py,sha256=fh5dkN06VgFMItgFMlB7BMdiBjalc24jdqaGTJI7yCM,25409
4
+ dataframe_textual/data_frame_help_panel.py,sha256=iEKaur-aH1N_oqHu-vMwEEjfkjQiThK24UO5izsOiW0,3416
5
+ dataframe_textual/data_frame_table.py,sha256=bzKD7PKz2CP7HeZIqUkpDYZHhx7amBaEzHWRlq2i3XY,127578
6
+ dataframe_textual/data_frame_viewer.py,sha256=4fPIj-dvqhoTRxxOPfwTfRpYcfle7VtwTZfP4sJHA6E,21254
7
+ dataframe_textual/sql_screen.py,sha256=Pk2ENyDVkOXBLcsEMeXOEMkdzRH_NJ3T1biVUcY8j4Q,7411
8
+ dataframe_textual/table_screen.py,sha256=IhaGAWjzXaLvvc4JLBlAM6_Hl3t7du7vuHQYhrvW_5o,18055
9
+ dataframe_textual/yes_no_screen.py,sha256=qbuhywLIGBL52zQfSGVZQCfsdSmDz9JH6C4YFLrLYKU,26233
10
+ dataframe_textual-1.10.1.dist-info/METADATA,sha256=F0pCwiggF6y2WVr9Fs4YDgII5Rh-JZHuGeJq1y5AQpA,30381
11
+ dataframe_textual-1.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ dataframe_textual-1.10.1.dist-info/entry_points.txt,sha256=R_GoooOxcq6ab4RaHiVoZ4zrZJ-phMcGmlL2rwqncW8,107
13
+ dataframe_textual-1.10.1.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
14
+ dataframe_textual-1.10.1.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- dataframe_textual/__init__.py,sha256=IFPb8RMUgghw0eRomehkkC684Iny_gs1VkiZMQ5ZpFk,813
2
- dataframe_textual/__main__.py,sha256=Ip0uzpUe8cegDrc87ACwJV2Y_J6YTzwun2A8EAflNiU,3253
3
- dataframe_textual/common.py,sha256=S2BEcdJMKfpEIewM-8zon5ZZZVE3YzMmkSj0GpMizkI,25211
4
- dataframe_textual/data_frame_help_panel.py,sha256=iEKaur-aH1N_oqHu-vMwEEjfkjQiThK24UO5izsOiW0,3416
5
- dataframe_textual/data_frame_table.py,sha256=ic1UOdzTBdFJ7O0tHEznY4lYOGn-MEKQ1VT1NL3brvw,123281
6
- dataframe_textual/data_frame_viewer.py,sha256=NIar6wcQ3W7ykBg8hXzTKhdjuLUgBE-WDLRJOdUk7ws,12965
7
- dataframe_textual/sql_screen.py,sha256=F-4C4AwjdyiXzLl6fheGrkVMfk-Yvz5EXaXPFfZq5xs,6165
8
- dataframe_textual/table_screen.py,sha256=d9YBwzZ1Hh7d7PbbnpUxUTFrQ2AtL2wxv2gPrwkdxGg,18136
9
- dataframe_textual/yes_no_screen.py,sha256=Qt0o8OpLS_M-s2A2Ip9v2Q80gvRh-NibL7mbu52hAFk,24092
10
- dataframe_textual-1.5.0.dist-info/METADATA,sha256=_LZR_j1scTTMaOiXm4NKitS6k9VHIlmjfvHXZxXnY3Y,34455
11
- dataframe_textual-1.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- dataframe_textual-1.5.0.dist-info/entry_points.txt,sha256=R_GoooOxcq6ab4RaHiVoZ4zrZJ-phMcGmlL2rwqncW8,107
13
- dataframe_textual-1.5.0.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
14
- dataframe_textual-1.5.0.dist-info/RECORD,,