dataframe-textual 3.2.1__tar.gz → 3.4.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.
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/.gitignore +1 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/PKG-INFO +22 -20
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/README.md +20 -18
- dataframe_textual-3.4.0/keys.log +1 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/pyproject.toml +5 -2
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/__main__.py +2 -1
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/common.py +2 -2
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/data_frame_table.py +47 -20
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/data_frame_viewer.py +1 -1
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/table_screen.py +11 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/uv.lock +16 -16
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/LICENSE +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/main.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/__init__.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/commands.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/console_panel.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/file_picker_screen.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/help_panel.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/keybindings.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/loading_screen.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/run_command_screen.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/status_bar.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/text_screen.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/theme_screen.py +0 -0
- {dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/yes_no_screen.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dataframe-textual
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: Interactive terminal viewer/editor (TUI) for CSV/TSV, Excel, Parquet, JSONL, etc.
|
|
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: fastexcel>=0.16.0
|
|
32
|
-
Requires-Dist: polars>=1.
|
|
32
|
+
Requires-Dist: polars>=2.1.0
|
|
33
33
|
Requires-Dist: textual[syntax]>=8.0.2
|
|
34
34
|
Requires-Dist: xlsxwriter>=3.2.9
|
|
35
35
|
Provides-Extra: dev
|
|
@@ -354,29 +354,31 @@ Useful examples from current bindings:
|
|
|
354
354
|
|
|
355
355
|
#### Undo/Redo/Reset
|
|
356
356
|
|
|
357
|
-
| Key
|
|
358
|
-
|
|
|
357
|
+
| Key | Action |
|
|
358
|
+
| --------- | ----------------------- |
|
|
359
359
|
| `u` / `U` | Undo last action |
|
|
360
360
|
| `R` | Redo last undone action |
|
|
361
|
-
| `gU`
|
|
361
|
+
| `gU` | Reset to initial state |
|
|
362
362
|
|
|
363
363
|
#### Navigation
|
|
364
364
|
|
|
365
|
-
| Key
|
|
366
|
-
|
|
|
367
|
-
| `gg`
|
|
368
|
-
| `G`
|
|
369
|
-
| `Ctrl+G`
|
|
370
|
-
| `←` / `↓` / `↑` / `→`
|
|
371
|
-
| `h` / `j` / `k` / `l`
|
|
372
|
-
| `gh` / `g←`
|
|
373
|
-
| `gj` / `g↓`
|
|
374
|
-
| `gk` / `g↑`
|
|
375
|
-
| `gl` / `g→`
|
|
376
|
-
| `Home` / `End`
|
|
377
|
-
| `Ctrl+Home` / `Ctrl+End`
|
|
378
|
-
| `PageUp` / `Ctrl+B`
|
|
379
|
-
| `PageDown` / `Ctrl+F`
|
|
365
|
+
| Key | Action |
|
|
366
|
+
| ------------------------------------------------- | ----------------------------------- |
|
|
367
|
+
| `gg` | Go to first row |
|
|
368
|
+
| `G` | Go to last row |
|
|
369
|
+
| `Ctrl+G` | Go to specific row |
|
|
370
|
+
| `←` / `↓` / `↑` / `→` | Move left/down/up/right |
|
|
371
|
+
| `h` / `j` / `k` / `l` | Move left/down/up/right (Vim-style) |
|
|
372
|
+
| `gh` / `g←` | Scroll to leftmost column |
|
|
373
|
+
| `gj` / `g↓` | Scroll to last row |
|
|
374
|
+
| `gk` / `g↑` | Scroll to first row |
|
|
375
|
+
| `gl` / `g→` | Scroll to rightmost column |
|
|
376
|
+
| `Home` / `End` | Go to first/last column |
|
|
377
|
+
| `Ctrl+Home` / `Ctrl+End` | Go to page top/bottom |
|
|
378
|
+
| `PageUp` / `Ctrl+B` | Page backward |
|
|
379
|
+
| `PageDown` / `Ctrl+F` | Page forward |
|
|
380
|
+
| `MouseScrollUp` / `MouseScrollDown` | Scroll vertically |
|
|
381
|
+
| `Ctrl + MouseScrollUp` / `Ctrl + MouseScrollDown` | Scroll horizontally |
|
|
380
382
|
|
|
381
383
|
#### Display
|
|
382
384
|
|
|
@@ -314,29 +314,31 @@ Useful examples from current bindings:
|
|
|
314
314
|
|
|
315
315
|
#### Undo/Redo/Reset
|
|
316
316
|
|
|
317
|
-
| Key
|
|
318
|
-
|
|
|
317
|
+
| Key | Action |
|
|
318
|
+
| --------- | ----------------------- |
|
|
319
319
|
| `u` / `U` | Undo last action |
|
|
320
320
|
| `R` | Redo last undone action |
|
|
321
|
-
| `gU`
|
|
321
|
+
| `gU` | Reset to initial state |
|
|
322
322
|
|
|
323
323
|
#### Navigation
|
|
324
324
|
|
|
325
|
-
| Key
|
|
326
|
-
|
|
|
327
|
-
| `gg`
|
|
328
|
-
| `G`
|
|
329
|
-
| `Ctrl+G`
|
|
330
|
-
| `←` / `↓` / `↑` / `→`
|
|
331
|
-
| `h` / `j` / `k` / `l`
|
|
332
|
-
| `gh` / `g←`
|
|
333
|
-
| `gj` / `g↓`
|
|
334
|
-
| `gk` / `g↑`
|
|
335
|
-
| `gl` / `g→`
|
|
336
|
-
| `Home` / `End`
|
|
337
|
-
| `Ctrl+Home` / `Ctrl+End`
|
|
338
|
-
| `PageUp` / `Ctrl+B`
|
|
339
|
-
| `PageDown` / `Ctrl+F`
|
|
325
|
+
| Key | Action |
|
|
326
|
+
| ------------------------------------------------- | ----------------------------------- |
|
|
327
|
+
| `gg` | Go to first row |
|
|
328
|
+
| `G` | Go to last row |
|
|
329
|
+
| `Ctrl+G` | Go to specific row |
|
|
330
|
+
| `←` / `↓` / `↑` / `→` | Move left/down/up/right |
|
|
331
|
+
| `h` / `j` / `k` / `l` | Move left/down/up/right (Vim-style) |
|
|
332
|
+
| `gh` / `g←` | Scroll to leftmost column |
|
|
333
|
+
| `gj` / `g↓` | Scroll to last row |
|
|
334
|
+
| `gk` / `g↑` | Scroll to first row |
|
|
335
|
+
| `gl` / `g→` | Scroll to rightmost column |
|
|
336
|
+
| `Home` / `End` | Go to first/last column |
|
|
337
|
+
| `Ctrl+Home` / `Ctrl+End` | Go to page top/bottom |
|
|
338
|
+
| `PageUp` / `Ctrl+B` | Page backward |
|
|
339
|
+
| `PageDown` / `Ctrl+F` | Page forward |
|
|
340
|
+
| `MouseScrollUp` / `MouseScrollDown` | Scroll vertically |
|
|
341
|
+
| `Ctrl + MouseScrollUp` / `Ctrl + MouseScrollDown` | Scroll horizontally |
|
|
340
342
|
|
|
341
343
|
#### Display
|
|
342
344
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
---
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dataframe-textual"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.4.0"
|
|
8
8
|
description = "Interactive terminal viewer/editor (TUI) for CSV/TSV, Excel, Parquet, JSONL, etc."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -36,7 +36,7 @@ dependencies = [
|
|
|
36
36
|
"fastexcel>=0.16.0",
|
|
37
37
|
"xlsxwriter>=3.2.9",
|
|
38
38
|
"textual[syntax]>=8.0.2",
|
|
39
|
-
"polars>=1.
|
|
39
|
+
"polars>=2.1.0",
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
[project.urls]
|
|
@@ -53,6 +53,9 @@ vortex = [
|
|
|
53
53
|
"vortex-data>=0.75.0",
|
|
54
54
|
]
|
|
55
55
|
|
|
56
|
+
[[tool.uv.index]]
|
|
57
|
+
url = "https://pypi.org/simple"
|
|
58
|
+
|
|
56
59
|
[tool.hatch.build.targets.wheel]
|
|
57
60
|
packages = ["src/dataframe_textual"]
|
|
58
61
|
include = [
|
|
@@ -277,7 +277,8 @@ def main() -> None:
|
|
|
277
277
|
ctx = pl.SQLContext(frames={"self": source.lf})
|
|
278
278
|
try:
|
|
279
279
|
source.lf = ctx.execute(args.sql)
|
|
280
|
-
|
|
280
|
+
source.lf.collect_schema()
|
|
281
|
+
except pl.exceptions.PolarsError as e:
|
|
281
282
|
print(f"SQL error: {e}", file=sys.stderr)
|
|
282
283
|
sys.exit(1)
|
|
283
284
|
|
|
@@ -797,7 +797,7 @@ def guess_file_format(filename: str | Path) -> str | None:
|
|
|
797
797
|
return None
|
|
798
798
|
|
|
799
799
|
ext = Path(filename).suffix.lower()
|
|
800
|
-
if ext
|
|
800
|
+
if ext in (".gz", ".zst"): # Handle .csv.gz, .tsv.zst, etc.
|
|
801
801
|
ext = Path(filename).with_suffix("").suffix.lower()
|
|
802
802
|
|
|
803
803
|
fmt = ext.removeprefix(".")
|
|
@@ -1079,7 +1079,7 @@ def write_file(sources: list[Source], filename: str) -> None:
|
|
|
1079
1079
|
for source in sources:
|
|
1080
1080
|
source.lf = source.lf.select(pl.exclude(RID))
|
|
1081
1081
|
|
|
1082
|
-
compression = "gzip" if filename.endswith(".gz") else "uncompressed"
|
|
1082
|
+
compression = "gzip" if filename.endswith(".gz") else "zstd" if filename.endswith(".zst") else "uncompressed"
|
|
1083
1083
|
|
|
1084
1084
|
try:
|
|
1085
1085
|
if fmt == "csv":
|
{dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/data_frame_table.py
RENAMED
|
@@ -19,7 +19,7 @@ from rich.text import Text, TextType
|
|
|
19
19
|
from textual import work
|
|
20
20
|
from textual._two_way_dict import TwoWayDict
|
|
21
21
|
from textual.coordinate import Coordinate
|
|
22
|
-
from textual.events import Click, Key
|
|
22
|
+
from textual.events import Click, Key, MouseScrollDown, MouseScrollUp
|
|
23
23
|
from textual.reactive import reactive
|
|
24
24
|
from textual.render import measure
|
|
25
25
|
from textual.renderables.bar import Bar
|
|
@@ -894,11 +894,11 @@ class DataFrameTable(DataTable):
|
|
|
894
894
|
else:
|
|
895
895
|
self.cmd_edit_cell()
|
|
896
896
|
|
|
897
|
-
def on_mouse_scroll_up(self, event) -> None:
|
|
897
|
+
def on_mouse_scroll_up(self, event: MouseScrollUp) -> None:
|
|
898
898
|
"""Load more rows when scrolling up with mouse."""
|
|
899
899
|
self.load_rows_up()
|
|
900
900
|
|
|
901
|
-
def on_mouse_scroll_down(self, event) -> None:
|
|
901
|
+
def on_mouse_scroll_down(self, event: MouseScrollDown) -> None:
|
|
902
902
|
"""Load more rows when scrolling down with mouse."""
|
|
903
903
|
self.load_rows_down()
|
|
904
904
|
|
|
@@ -1427,6 +1427,7 @@ class DataFrameTable(DataTable):
|
|
|
1427
1427
|
dc = DtypeConfig(dtype)
|
|
1428
1428
|
is_string = dc.gtype == "string"
|
|
1429
1429
|
is_expanded = self.column_widths.get(col) == -1
|
|
1430
|
+
is_list = isinstance(self.df.schema[col], pl.List)
|
|
1430
1431
|
|
|
1431
1432
|
try:
|
|
1432
1433
|
sample_values = sample_lf.select(col).collect().get_column(col).drop_nulls().to_list()
|
|
@@ -1451,6 +1452,10 @@ class DataFrameTable(DataTable):
|
|
|
1451
1452
|
# Cap and queue for phase 2
|
|
1452
1453
|
col_widths[col] = max(label_width, COLUMN_WIDTH_CAP)
|
|
1453
1454
|
capped_cols.append(col)
|
|
1455
|
+
elif is_list and not is_expanded and ideal_width > COLUMN_WIDTH_CAP:
|
|
1456
|
+
# Cap and queue for phase 2
|
|
1457
|
+
col_widths[col] = max(label_width, COLUMN_WIDTH_CAP)
|
|
1458
|
+
capped_cols.append(col)
|
|
1454
1459
|
else:
|
|
1455
1460
|
# Numeric / bool / temporal / short string / expanded: natural width
|
|
1456
1461
|
col_widths[col] = ideal_width
|
|
@@ -3063,7 +3068,12 @@ class DataFrameTable(DataTable):
|
|
|
3063
3068
|
# Get updated column from df for rows that exist in dfull
|
|
3064
3069
|
lf_updated = self.df.lazy().select(RID, pl.col(new_col_name))
|
|
3065
3070
|
# Join and use coalesce to prefer updated value or keep original
|
|
3066
|
-
self.dfull =
|
|
3071
|
+
self.dfull = (
|
|
3072
|
+
self.dfull.lazy()
|
|
3073
|
+
.join(lf_updated, on=RID, how="left", maintain_order="left")
|
|
3074
|
+
.select(select_cols)
|
|
3075
|
+
.collect()
|
|
3076
|
+
)
|
|
3067
3077
|
|
|
3068
3078
|
# Recreate table for display
|
|
3069
3079
|
self.setup_table()
|
|
@@ -3612,7 +3622,12 @@ class DataFrameTable(DataTable):
|
|
|
3612
3622
|
# Get updated column from df for rows that exist in dfull
|
|
3613
3623
|
lf_updated = self.df.lazy().select(RID, pl.col(new_col_name))
|
|
3614
3624
|
# Join and use coalesce to prefer updated value or keep original
|
|
3615
|
-
self.dfull =
|
|
3625
|
+
self.dfull = (
|
|
3626
|
+
self.dfull.lazy()
|
|
3627
|
+
.join(lf_updated, on=RID, how="left", maintain_order="left")
|
|
3628
|
+
.select(select_cols)
|
|
3629
|
+
.collect()
|
|
3630
|
+
)
|
|
3616
3631
|
|
|
3617
3632
|
# Recreate table for display
|
|
3618
3633
|
self.setup_table()
|
|
@@ -3800,14 +3815,14 @@ class DataFrameTable(DataTable):
|
|
|
3800
3815
|
|
|
3801
3816
|
# If it's already a list column, just explode it
|
|
3802
3817
|
if dtype == pl.List:
|
|
3803
|
-
lf_view = self.dfull.lazy().rename({RID: RID_OLD}).explode(col_name)
|
|
3818
|
+
lf_view = self.dfull.lazy().rename({RID: RID_OLD}).explode(col_name, empty_as_null=True)
|
|
3804
3819
|
# If a delimiter is provided, split the string column by the delimiter
|
|
3805
3820
|
elif dtype == pl.String and delimiter:
|
|
3806
3821
|
lf_view = (
|
|
3807
3822
|
self.dfull.lazy()
|
|
3808
3823
|
.rename({RID: RID_OLD})
|
|
3809
3824
|
.with_columns(pl.col(col_name).str.split(delimiter))
|
|
3810
|
-
.explode(col_name)
|
|
3825
|
+
.explode(col_name, empty_as_null=True)
|
|
3811
3826
|
)
|
|
3812
3827
|
|
|
3813
3828
|
else:
|
|
@@ -3824,9 +3839,14 @@ class DataFrameTable(DataTable):
|
|
|
3824
3839
|
self.dfull = add_rid_column(lfull).collect()
|
|
3825
3840
|
else:
|
|
3826
3841
|
if dtype == pl.List:
|
|
3827
|
-
lf = self.df.lazy().drop(RID).explode(col_name)
|
|
3842
|
+
lf = self.df.lazy().drop(RID).explode(col_name, empty_as_null=True)
|
|
3828
3843
|
elif dtype == pl.String and delimiter:
|
|
3829
|
-
lf =
|
|
3844
|
+
lf = (
|
|
3845
|
+
self.df.lazy()
|
|
3846
|
+
.drop(RID)
|
|
3847
|
+
.with_columns(pl.col(col_name).str.split(delimiter))
|
|
3848
|
+
.explode(col_name, empty_as_null=True)
|
|
3849
|
+
)
|
|
3830
3850
|
else:
|
|
3831
3851
|
return
|
|
3832
3852
|
|
|
@@ -4347,19 +4367,25 @@ class DataFrameTable(DataTable):
|
|
|
4347
4367
|
|
|
4348
4368
|
try:
|
|
4349
4369
|
# Cast the column using Polars
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4370
|
+
column = pl.col(col_name)
|
|
4371
|
+
if current_dtype == pl.String and target_dtype == pl.Date:
|
|
4372
|
+
conversion = column.str.to_date()
|
|
4373
|
+
elif current_dtype == pl.String and target_dtype == pl.Datetime:
|
|
4374
|
+
conversion = column.str.to_datetime()
|
|
4375
|
+
elif current_dtype == pl.String and target_dtype == pl.Time:
|
|
4376
|
+
conversion = column.str.to_time()
|
|
4377
|
+
elif current_dtype == pl.Datetime and target_dtype == pl.Date:
|
|
4378
|
+
conversion = column.dt.date()
|
|
4357
4379
|
else:
|
|
4358
|
-
|
|
4380
|
+
conversion = column.cast(target_dtype)
|
|
4381
|
+
|
|
4382
|
+
converted_df = self.df.with_columns(conversion)
|
|
4383
|
+
converted_full = self.dfull.with_columns(conversion) if self.in_view else None
|
|
4384
|
+
self.df = converted_df
|
|
4359
4385
|
|
|
4360
4386
|
# Also update the full datafram if applicable
|
|
4361
4387
|
if self.in_view:
|
|
4362
|
-
self.dfull =
|
|
4388
|
+
self.dfull = converted_full
|
|
4363
4389
|
|
|
4364
4390
|
# Recreate table for display
|
|
4365
4391
|
self.setup_table()
|
|
@@ -5587,9 +5613,10 @@ class DataFrameTable(DataTable):
|
|
|
5587
5613
|
# Apply filter to dataframe with row indices
|
|
5588
5614
|
lf_filtered = self.df.lazy().filter(filter_expr)
|
|
5589
5615
|
|
|
5590
|
-
# Apply column selection if any
|
|
5616
|
+
# Apply column selection if any, preserving original column order
|
|
5591
5617
|
if self.selected_columns:
|
|
5592
|
-
|
|
5618
|
+
selected = [col for col in self.df.columns if col in self.selected_columns or col == RID]
|
|
5619
|
+
lf_filtered = lf_filtered.select(selected)
|
|
5593
5620
|
|
|
5594
5621
|
# Collect the filtered dataframe
|
|
5595
5622
|
df_filtered = lf_filtered.collect()
|
{dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/data_frame_viewer.py
RENAMED
|
@@ -1287,7 +1287,7 @@ class DataFrameViewer(App):
|
|
|
1287
1287
|
lf = (table.df if use_view else (table.dfull if table.in_view else table.df)).lazy()
|
|
1288
1288
|
|
|
1289
1289
|
df: pl.DataFrame = lf.select(pl.exclude(RID)).collect()
|
|
1290
|
-
compression = "gzip" if filename.endswith(".gz") else "uncompressed"
|
|
1290
|
+
compression = "gzip" if filename.endswith(".gz") else "zstd" if filename.endswith(".zst") else "uncompressed"
|
|
1291
1291
|
|
|
1292
1292
|
try:
|
|
1293
1293
|
if fmt == "csv":
|
|
@@ -693,6 +693,11 @@ class StatisticsScreen(TableScreen):
|
|
|
693
693
|
df_n_unique.insert_column(0, pl.Series("statistic", ["n_unique"]))
|
|
694
694
|
df_n_unique = df_n_unique.cast(stats_df.schema)
|
|
695
695
|
|
|
696
|
+
# duplicate count for each column (entries whose value is not unique)
|
|
697
|
+
df_n_duplicate = lf.select(pl.all().is_duplicated().sum()).collect()
|
|
698
|
+
df_n_duplicate.insert_column(0, pl.Series("statistic", ["n_duplicate"]))
|
|
699
|
+
df_n_duplicate = df_n_duplicate.cast(stats_df.schema)
|
|
700
|
+
|
|
696
701
|
# sum
|
|
697
702
|
sum_exprs: list[pl.Expr] = [pl.lit("sum").alias("statistic")]
|
|
698
703
|
for col_name, dtype in source_schema.items():
|
|
@@ -741,6 +746,7 @@ class StatisticsScreen(TableScreen):
|
|
|
741
746
|
self.df = pl.concat(
|
|
742
747
|
[
|
|
743
748
|
df_n_unique,
|
|
749
|
+
df_n_duplicate,
|
|
744
750
|
df_n_total,
|
|
745
751
|
stats_df,
|
|
746
752
|
df_sum,
|
|
@@ -766,6 +772,10 @@ class StatisticsScreen(TableScreen):
|
|
|
766
772
|
n_unique = this_col.n_unique()
|
|
767
773
|
df_n_unique = pl.DataFrame({"statistic": ["n_unique"], col_name: n_unique}, schema=stats_df.schema)
|
|
768
774
|
|
|
775
|
+
# duplicate count (entries whose value is not unique)
|
|
776
|
+
n_duplicate = this_col.is_duplicated().sum()
|
|
777
|
+
df_n_duplicate = pl.DataFrame({"statistic": ["n_duplicate"], col_name: n_duplicate}, schema=stats_df.schema)
|
|
778
|
+
|
|
769
779
|
# total count
|
|
770
780
|
n_total = len(this_col)
|
|
771
781
|
df_n_total = pl.DataFrame({"statistic": ["n_total"], col_name: n_total}, schema=stats_df.schema)
|
|
@@ -809,6 +819,7 @@ class StatisticsScreen(TableScreen):
|
|
|
809
819
|
self.df = pl.concat(
|
|
810
820
|
[
|
|
811
821
|
df_n_unique,
|
|
822
|
+
df_n_duplicate,
|
|
812
823
|
df_n_total,
|
|
813
824
|
stats_df,
|
|
814
825
|
df_sum,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 5
|
|
3
3
|
requires-python = ">=3.11"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -187,7 +187,7 @@ wheels = [
|
|
|
187
187
|
|
|
188
188
|
[[package]]
|
|
189
189
|
name = "dataframe-textual"
|
|
190
|
-
version = "3.
|
|
190
|
+
version = "3.4.0"
|
|
191
191
|
source = { editable = "." }
|
|
192
192
|
dependencies = [
|
|
193
193
|
{ name = "fastexcel" },
|
|
@@ -212,7 +212,7 @@ dev = [
|
|
|
212
212
|
[package.metadata]
|
|
213
213
|
requires-dist = [
|
|
214
214
|
{ name = "fastexcel", specifier = ">=0.16.0" },
|
|
215
|
-
{ name = "polars", specifier = ">=1.
|
|
215
|
+
{ name = "polars", specifier = ">=2.1.0" },
|
|
216
216
|
{ name = "textual", extras = ["syntax"], specifier = ">=8.0.2" },
|
|
217
217
|
{ name = "textual-dev", marker = "extra == 'dev'", specifier = ">=1.8.0" },
|
|
218
218
|
{ name = "vortex-data", marker = "extra == 'vortex'", specifier = ">=0.75.0" },
|
|
@@ -687,30 +687,30 @@ wheels = [
|
|
|
687
687
|
|
|
688
688
|
[[package]]
|
|
689
689
|
name = "polars"
|
|
690
|
-
version = "1.
|
|
690
|
+
version = "2.1.0"
|
|
691
691
|
source = { registry = "https://pypi.org/simple" }
|
|
692
692
|
dependencies = [
|
|
693
693
|
{ name = "polars-runtime-32" },
|
|
694
694
|
]
|
|
695
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
695
|
+
sdist = { url = "https://files.pythonhosted.org/packages/b9/da/c27daf205a824f89f71172a75ad0098c5837a5a31ddeaac7f8737ea8574b/polars-2.1.0.tar.gz", hash = "sha256:9eee488d6e10773c028753dfc8dac647fd60a708108dcb818a733e85d33df253", size = 811508, upload-time = "2026-10-25T18:00:33.43Z" }
|
|
696
696
|
wheels = [
|
|
697
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
697
|
+
{ url = "https://files.pythonhosted.org/packages/d5/d4/e696a46c74ec8cac6434764deaf72f7edcc2e91c2145a9b3f61900a7aa7a/polars-2.1.0-py3-none-any.whl", hash = "sha256:63c50ce3533f5a03d17c3a2a24f1d0e0c7eda98fbde4268a3cba900d34060e67", size = 911474, upload-time = "2026-10-25T17:58:26.863Z" },
|
|
698
698
|
]
|
|
699
699
|
|
|
700
700
|
[[package]]
|
|
701
701
|
name = "polars-runtime-32"
|
|
702
|
-
version = "1.
|
|
702
|
+
version = "2.1.0"
|
|
703
703
|
source = { registry = "https://pypi.org/simple" }
|
|
704
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
704
|
+
sdist = { url = "https://files.pythonhosted.org/packages/e0/a6/46e09af693326735b1fba3a8bf5a725b57136fb1342e707e75d3113c826b/polars_runtime_32-2.1.0.tar.gz", hash = "sha256:c575f5f3cdb8a5f9be65477b9b4202b062593687fe62a0082add87fbd4571067", size = 3878004, upload-time = "2026-10-25T18:00:34.932Z" }
|
|
705
705
|
wheels = [
|
|
706
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
707
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
708
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
709
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
710
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
711
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
712
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
713
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
706
|
+
{ url = "https://files.pythonhosted.org/packages/7a/40/b424f3946c702ff48eef14e44d35df81a25a784f20f77355f39c746528fc/polars_runtime_32-2.1.0-cp311-abi3-macosx_10_12_x86_64.whl", hash = "sha256:de243b6e5a0b9f3abeaefe542136fcdc6dd8df5be3c988a40838d075314e246c", size = 52169672, upload-time = "2026-10-25T17:58:32.437Z" },
|
|
707
|
+
{ url = "https://files.pythonhosted.org/packages/fe/38/07066430ac655a8cab2f9e96ea1fec6ca1f20ec47844afe117662d43ace0/polars_runtime_32-2.1.0-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:317314d65949f1d58c4939adf83aa0d2cfaf8da50fd4a725a2de27bde2c10018", size = 47626883, upload-time = "2026-10-25T17:58:38.688Z" },
|
|
708
|
+
{ url = "https://files.pythonhosted.org/packages/49/a8/a773e20b451bbaab4d8267867b7c43a0c3aa67ebb6f781423a42a5a1af37/polars_runtime_32-2.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:777228cc8bf9cda36dee85ba74d13a25974ad4caffc5da93e10b1da9d810ce2d", size = 50033514, upload-time = "2026-10-25T17:58:44.261Z" },
|
|
709
|
+
{ url = "https://files.pythonhosted.org/packages/d2/e6/649c524252d32b24d0ba92278033823fa8e0040ee3748ce5afbeda107403/polars_runtime_32-2.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b838056cf365d7497971d9d9825c547766923338771c48c545b86ead2ebc572", size = 53863954, upload-time = "2026-10-25T17:58:48.737Z" },
|
|
710
|
+
{ url = "https://files.pythonhosted.org/packages/90/f7/2eb405bf5ead6373a33fa5dd4637fe996565a1f07ccce8911ed167673740/polars_runtime_32-2.1.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:04cfc3db1571b74ea4145944de7feceed4bfc9b26e5b2c265e27ad3b2d3866a9", size = 50204290, upload-time = "2026-10-25T17:58:53.33Z" },
|
|
711
|
+
{ url = "https://files.pythonhosted.org/packages/33/4d/d76cd42042605e079d6df91cc4fea09ed5f4cb836c72c952a17f585860a9/polars_runtime_32-2.1.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:af58b5f6e5cc44b578f2a93d752f87c135c3a53205b4360301bc3a9b89dfbfd1", size = 53794253, upload-time = "2026-10-25T17:58:57.99Z" },
|
|
712
|
+
{ url = "https://files.pythonhosted.org/packages/4d/4e/2a419d0def2908255dd1b7318c48430319859dc92ca156e2f81ff7bcd78b/polars_runtime_32-2.1.0-cp311-abi3-win_amd64.whl", hash = "sha256:f2fe32f48af2395cd6ec52a433a03970a69aab1dbb66a613729fd549ce92c904", size = 53926265, upload-time = "2026-10-25T17:59:03.13Z" },
|
|
713
|
+
{ url = "https://files.pythonhosted.org/packages/c8/1b/15ffba3264baf21d2f04c51f54b01159cb6f4fad4e84de1404be552d601f/polars_runtime_32-2.1.0-cp311-abi3-win_arm64.whl", hash = "sha256:0af30dd53a7725f703d0d21dd421a39e0165378bfaa41431008f286608376d71", size = 48636436, upload-time = "2026-10-25T17:59:08.476Z" },
|
|
714
714
|
]
|
|
715
715
|
|
|
716
716
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/file_picker_screen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataframe_textual-3.2.1 → dataframe_textual-3.4.0}/src/dataframe_textual/run_command_screen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|