dataframe-textual 1.2.0__py3-none-any.whl → 1.4.0__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.2.0
3
+ Version: 1.4.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
@@ -29,7 +29,7 @@ Classifier: Topic :: Utilities
29
29
  Classifier: Typing :: Typed
30
30
  Requires-Python: >=3.11
31
31
  Requires-Dist: polars>=1.34.0
32
- Requires-Dist: textual>=6.5.0
32
+ Requires-Dist: textual[syntax]>=6.5.0
33
33
  Provides-Extra: dev
34
34
  Requires-Dist: textual-dev>=1.8.0; extra == 'dev'
35
35
  Provides-Extra: excel
@@ -129,6 +129,13 @@ uv run python main.py pokemon.csv
129
129
  # Read from stdin (auto-detects format; defaults to TSV if not recognized)
130
130
  cat data.tsv | dv
131
131
  dv < data.tsv
132
+
133
+ # Gzipped files are supported
134
+ dv data.csv.gz
135
+ dv large_dataset.tsv.gz
136
+
137
+ # Specify format for gzipped stdin
138
+ zcat data.csv.gz | dv -f csv
132
139
  ```
133
140
 
134
141
  ### Multi-File Usage - Multiple Tabs
@@ -142,6 +149,9 @@ dv file.xlsx
142
149
 
143
150
  # Mix files and stdin (read from stdin, then open file)
144
151
  dv data1.tsv < data2.tsv
152
+
153
+ # Mix regular and gzipped files
154
+ dv data1.csv data2.csv.gz data3.tsv.gz
145
155
  ```
146
156
 
147
157
  When multiple files are opened:
@@ -151,6 +161,67 @@ When multiple files are opened:
151
161
  - Close the current tab with `Ctrl+W`
152
162
  - Each file maintains its own state (edits, sort order, selections, history, etc.)
153
163
 
164
+ ## Command Line Options
165
+
166
+ ```
167
+ usage: dv [-h] [-f {csv,excel,tsv,parquet,json,ndjson}] [-H] [-I] [-L SKIP_LINES] [-K SKIP_ROWS_AFTER_HEADER] [-U NULL [NULL ...]] [files ...]
168
+
169
+ Interactive terminal based viewer/editor for tabular data (e.g., CSV/Excel).
170
+
171
+ positional arguments:
172
+ files Files to view (or read from stdin)
173
+
174
+ options:
175
+ -h, --help show this help message and exit
176
+ -f, --format {csv,excel,tsv,parquet,json,ndjson}
177
+ Specify the format of the input files
178
+ -H, --no-header Specify that input files have no header row
179
+ -I, --no-inferrence Do not infer data types when reading CSV/TSV
180
+ -L, --skip-lines SKIP_LINES
181
+ Skip lines when reading CSV/TSV (default: 0)
182
+ -K, --skip-rows-after-header SKIP_ROWS_AFTER_HEADER
183
+ Skip rows after header when reading CSV/TSV (default: 0)
184
+ -U, --null NULL [NULL ...]
185
+ Values to interpret as null values when reading CSV/TSV
186
+ ```
187
+
188
+ ### CLI Examples
189
+
190
+ ```bash
191
+ # View CSV file without header row
192
+ dv -H data_no_header.csv
193
+
194
+ # Disable type inference for faster loading
195
+ dv -I large_data.csv
196
+
197
+ # Skip first 3 lines of file (e.g., comments, metadata)
198
+ dv -L 3 data_with_comments.csv
199
+
200
+ # Skip 1 row after header (e.g., units row)
201
+ dv -K 1 data_with_units.csv
202
+
203
+ # Treat specific values as null/missing (e.g., 'NA', 'N/A', '-')
204
+ dv -U NA N/A - data.csv
205
+
206
+ # Multiple null values with different formats
207
+ dv -U NULL NA "" "Not Available" messy_data.csv
208
+
209
+ # Complex CSV with comments and units row
210
+ dv -L 3 -K 1 -I messy_scientific_data.csv
211
+
212
+ # Combine all options: skip lines, skip after header, no header, no inference, gzipped
213
+ dv -L 2 -K 1 -H -I complex_data.csv.gz
214
+
215
+ # Process compressed data from stdin with line skipping
216
+ zcat compressed_data.csv.gz | dv -f csv -L 2
217
+
218
+ # CSV with custom null values and no header
219
+ dv -H -U NA "N/A" "-" raw_data.csv
220
+
221
+ # Skip lines, specify null values, and disable type inference
222
+ dv -L 5 -U NA "" data_with_metadata.csv
223
+ ```
224
+
154
225
  ## Keyboard Shortcuts
155
226
 
156
227
  ### App-Level Controls
@@ -161,7 +232,7 @@ When multiple files are opened:
161
232
  |-----|--------|
162
233
  | `Ctrl+O` | Open file in a new tab |
163
234
  | `Ctrl+W` | Close current tab |
164
- | `Ctrl+Shift+S` | Save all open tabs to Excel file |
235
+ | `Ctrl+A` | Save all open tabs to Excel file |
165
236
  | `>` or `b` | Move to next tab |
166
237
  | `<` | Move to previous tab |
167
238
  | `B` | Toggle tab bar visibility |
@@ -171,7 +242,7 @@ When multiple files are opened:
171
242
 
172
243
  | Key | Action |
173
244
  |-----|--------|
174
- | `Ctrl+H` | Toggle help panel |
245
+ | `F1` | Toggle help panel |
175
246
  | `k` | Cycle through themes |
176
247
 
177
248
  ---
@@ -189,6 +260,8 @@ When multiple files are opened:
189
260
  | `Home` / `End` | Jump to first/last column in current row |
190
261
  | `Ctrl + Home` / `Ctrl + End` | Jump to top/bottom in current page |
191
262
  | `PageDown` / `PageUp` | Scroll down/up one page |
263
+ | `Ctrl+F` | Page down |
264
+ | `Ctrl+B` | Page up |
192
265
 
193
266
  #### Viewing & Display
194
267
 
@@ -200,6 +273,7 @@ When multiple files are opened:
200
273
  | `S` | Show statistics for entire dataframe |
201
274
  | `K` | Cycle cursor type: cell → row → column → cell |
202
275
  | `~` | Toggle row labels |
276
+ | `_` (underscore) | Expand column to full width |
203
277
 
204
278
  #### Data Editing
205
279
 
@@ -212,8 +286,6 @@ When multiple files are opened:
212
286
  | `a` | Add empty column after current |
213
287
  | `A` | Add column with name and value/expression |
214
288
  | `-` (minus) | Delete current column |
215
- | `_` (underscore) | Delete current column and all columns after |
216
- | `Ctrl+-` | Delete current column and all columns before |
217
289
  | `x` | Delete current row |
218
290
  | `X` | Delete current row and all rows below |
219
291
  | `Ctrl+X` | Delete current row and all rows above |
@@ -241,12 +313,19 @@ When multiple files are opened:
241
313
  | `v` | View only rows by selected rows and/or matches or cursor value |
242
314
  | `V` | View only rows by expression |
243
315
 
316
+ #### SQL Interface
317
+
318
+ | Key | Action |
319
+ |-----|--------|
320
+ | `l` | Simple SQL interface (select columns & WHERE clause) |
321
+ | `L` | Advanced SQL interface (full SQL queries) |
322
+
244
323
  #### Find & Replace
245
324
 
246
325
  | Key | Action |
247
326
  |-----|--------|
248
- | `f` | Find across all columns with cursor value |
249
- | `Ctrl+F` | Find across all columns with expression |
327
+ | `;` | Find across all columns with cursor value |
328
+ | `:` | Find across all columns with expression |
250
329
  | `r` | Find and replace in current column (interactive or replace all) |
251
330
  | `R` | Find and replace across all columns (interactive or replace all) |
252
331
 
@@ -322,8 +401,8 @@ The application provides multiple search modes for different use cases:
322
401
  **Find Operations** - Find by value/expression:
323
402
  - **`/` - Column Find**: Find cursor value within current column
324
403
  - **`?` - Column Expression Find**: Open dialog to search current column with expression
325
- - **`f` - Global Find**: Find cursor value across all columns
326
- - **`Ctrl+f` - Global Expression Find**: Open dialog to search all columns with expression
404
+ - **`;` - Global Find**: Find cursor value across all columns
405
+ - **`:` - Global Expression Find**: Open dialog to search all columns with expression
327
406
 
328
407
  **Selection & Filtering**:
329
408
  - **`'` - Toggle Row Selection**: Select/deselect current row (marks it for filtering)
@@ -703,7 +782,40 @@ Press `@` to make URLs in the current column clickable:
703
782
  - **Scans** all cells in the current column for URLs starting with `http://` or `https://`
704
783
  - **Applies** link styling to make them clickable and dataframe remains unchanged
705
784
 
706
- ### 19. Clipboard Operations
785
+ ### 19. SQL Interface
786
+
787
+ The SQL interface provides two modes for querying your dataframe:
788
+
789
+ #### Simple SQL Interface (`l`)
790
+ Select specific columns and apply WHERE conditions without writing full SQL:
791
+ - Choose which columns to include in results
792
+ - Specify WHERE clause for filtering
793
+ - Ideal for quick filtering and column selection
794
+
795
+ #### Advanced SQL Interface (`L`)
796
+ Execute complete SQL queries for advanced data manipulation:
797
+ - Write full SQL queries with standard [SQL syntax](https://docs.pola.rs/api/python/stable/reference/sql/index.html)
798
+ - Support for JOINs, GROUP BY, aggregations, and more
799
+ - Access to all SQL capabilities for complex transformations
800
+ - Always use `self` as the table name
801
+
802
+ **Examples:**
803
+ ```sql
804
+ -- Filter and select specific rows and/or columns
805
+ SELECT name, age FROM self WHERE age > 30
806
+
807
+ -- Aggregate with GROUP BY
808
+ SELECT department, COUNT(*) as count, AVG(salary) as avg_salary
809
+ FROM self
810
+ GROUP BY department
811
+
812
+ -- Complex filtering with multiple conditions
813
+ SELECT *
814
+ FROM self
815
+ WHERE (age > 25 AND salary > 50000) OR department = 'Management'
816
+ ```
817
+
818
+ ### 20. Clipboard Operations
707
819
 
708
820
  Copies value to system clipboard with `pbcopy` on macOS and `xclip` on Linux
709
821
 
@@ -722,6 +834,30 @@ dv pokemon.csv
722
834
 
723
835
  # Chain with other command and specify input file format
724
836
  cut -d',' -f1,2,3 pokemon.csv | dv -f csv
837
+
838
+ # Work with gzipped files
839
+ dv large_dataset.csv.gz
840
+
841
+ # CSV file without header row
842
+ dv -H raw_data.csv
843
+
844
+ # Skip type inference for faster loading
845
+ dv -I huge_file.csv
846
+
847
+ # Skip first 5 lines (comments, metadata)
848
+ dv -L 5 data_with_metadata.csv
849
+
850
+ # Skip 1 row after header (units row)
851
+ dv -K 1 data_with_units.csv
852
+
853
+ # Complex CSV with comments and units row
854
+ dv -L 3 -K 1 -I messy_scientific_data.csv
855
+
856
+ # Combine all options: skip lines, skip after header, no header, no inference, gzipped
857
+ dv -L 2 -K 1 -H -I complex_data.csv.gz
858
+
859
+ # Process compressed data from stdin with line skipping
860
+ zcat compressed_data.csv.gz | dv -f csv -L 2
725
861
  ```
726
862
 
727
863
  ### Multi-File/Tab Examples
@@ -730,8 +866,8 @@ cut -d',' -f1,2,3 pokemon.csv | dv -f csv
730
866
  # Open multiple sheets as tabs in a single Excel
731
867
  dv sales.xlsx
732
868
 
733
- # Open multiple files as tabs
734
- dv pokemon.csv titanic.csv
869
+ # Open multiple files as tabs (including gzipped)
870
+ dv pokemon.csv titanic.csv large_data.csv.gz
735
871
 
736
872
  # Start with one file, then open others using Ctrl+O
737
873
  dv initial_data.csv
@@ -0,0 +1,14 @@
1
+ dataframe_textual/__init__.py,sha256=IFPb8RMUgghw0eRomehkkC684Iny_gs1VkiZMQ5ZpFk,813
2
+ dataframe_textual/__main__.py,sha256=pNTqyzFO2xg_HDwNCu5MRLWEZdOB8_lzG62Za0ObyhE,2922
3
+ dataframe_textual/common.py,sha256=SAW06ArDY6VW2SjwlSBCTVEGsh66to3Hz5XH5ADAqew,24204
4
+ dataframe_textual/data_frame_help_panel.py,sha256=iEKaur-aH1N_oqHu-vMwEEjfkjQiThK24UO5izsOiW0,3416
5
+ dataframe_textual/data_frame_table.py,sha256=CQgRIyu6ek5nRCzME9N9eIIeVilK7gBBaYQEToJsV6g,120710
6
+ dataframe_textual/data_frame_viewer.py,sha256=S9RDcmom8sVksVo9X19zJWhyoE3mYp64vbDm5CvgLKM,12885
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=M39oBRrHbGAy476siNjNRJ8CqkkAlsJQtdJLnRM71nI,23228
10
+ dataframe_textual-1.4.0.dist-info/METADATA,sha256=Em_9725XE792LVualpaWr-a1s66UhNQ7FIQrMknqUEg,30745
11
+ dataframe_textual-1.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ dataframe_textual-1.4.0.dist-info/entry_points.txt,sha256=R_GoooOxcq6ab4RaHiVoZ4zrZJ-phMcGmlL2rwqncW8,107
13
+ dataframe_textual-1.4.0.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
14
+ dataframe_textual-1.4.0.dist-info/RECORD,,
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
+ dataframe-textual = dataframe_textual.__main__:main
2
3
  dv = dataframe_textual.__main__:main
@@ -1,13 +0,0 @@
1
- dataframe_textual/__init__.py,sha256=IFPb8RMUgghw0eRomehkkC684Iny_gs1VkiZMQ5ZpFk,813
2
- dataframe_textual/__main__.py,sha256=hgjKLT3ggGxVVeRBunkArTy7PTqOHVJUf3fsH4P5dfU,2146
3
- dataframe_textual/common.py,sha256=q4bXS7oiJAsdcMEfHkPm5-e8SlfcwCBNhFN9TinQqV0,16171
4
- dataframe_textual/data_frame_help_panel.py,sha256=XgKGEPJr2hnDWpZ5mavLRcBSPa9cvrXdzVUGFQavXm4,3353
5
- dataframe_textual/data_frame_table.py,sha256=UbUlPwrcLbN_yNz9ECMgKHypTgVV5qDLvSQUJsDby8Q,109452
6
- dataframe_textual/data_frame_viewer.py,sha256=4mV3k7MNTf9TKBmGJ8fDx7itA1vo4qSmaWpvZozwfjs,12987
7
- dataframe_textual/table_screen.py,sha256=KCmvKAdHexIFQKGob6WMPrcAITHO6CMVpRJzzs0pbrE,17793
8
- dataframe_textual/yes_no_screen.py,sha256=vyUKMBbbwgt5At1U430eLg3WbJvqUNoz2GpvdnMd7q0,22921
9
- dataframe_textual-1.2.0.dist-info/METADATA,sha256=zLQtFr7h6-7fZ5dJoNYjGX5cghyKpGDKX0c7-wSbUy0,26688
10
- dataframe_textual-1.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
- dataframe_textual-1.2.0.dist-info/entry_points.txt,sha256=Z0XKp1ACvmbJymekkxt-C81I0OoInksr5Ib0w2OT_a4,55
12
- dataframe_textual-1.2.0.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
13
- dataframe_textual-1.2.0.dist-info/RECORD,,