dataframe-textual 2.7.0__py3-none-any.whl → 2.8.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.
@@ -188,9 +188,10 @@ class DataFrameTable(DataTable):
188
188
  - *(Supports case-insensitive & whole-word matching)*
189
189
 
190
190
  ## 👁️ View & Filter
191
- - **"** - 📍 Filter selected rows (removes others)
192
- - **v** - 👁️ View selected rows (hides others)
193
- - **V** - 🔧 View selected rows matching expression (hides others)
191
+ - **"** - 📍 Filter selected rows (others removed)
192
+ - **.** - 👁️ View rows with non-null values in current column (others hidden)
193
+ - **v** - 👁️ View selected rows (others hidden)
194
+ - **V** - 🔧 View selected rows matching expression (others hidden)
194
195
 
195
196
  ## 🔍 SQL Interface
196
197
  - **l** - 💬 Open simple SQL interface (select columns & where clause)
@@ -264,6 +265,7 @@ class DataFrameTable(DataTable):
264
265
  ("left_square_bracket", "sort_ascending", "Sort ascending"), # `[`
265
266
  ("right_square_bracket", "sort_descending", "Sort descending"), # `]`
266
267
  # View & Filter
268
+ ("full_stop", "view_rows_non_null", "View rows with non-null values in current column"),
267
269
  ("v", "view_rows", "View selected rows"),
268
270
  ("V", "view_rows_expr", "View selected rows matching expression"),
269
271
  ("quotation_mark", "filter_rows", "Filter selected rows"), # `"`
@@ -761,6 +763,10 @@ class DataFrameTable(DataTable):
761
763
  """Show metadata for the current column."""
762
764
  self.do_metadata_column()
763
765
 
766
+ def action_view_rows_non_null(self) -> None:
767
+ """View rows with non-null values in the current column."""
768
+ self.do_view_rows_non_null()
769
+
764
770
  def action_view_rows(self) -> None:
765
771
  """View rows by current cell value."""
766
772
  self.do_view_rows()
@@ -3603,6 +3609,15 @@ class DataFrameTable(DataTable):
3603
3609
  self.show_next_replace_confirmation()
3604
3610
 
3605
3611
  # View & Filter
3612
+ def do_view_rows_non_null(self) -> None:
3613
+ """View non-null rows based on the cursor column."""
3614
+ cidx = self.cursor_col_idx
3615
+ col_name = self.cursor_col_name
3616
+
3617
+ term = pl.col(col_name).is_not_null()
3618
+
3619
+ self.view_rows((term, cidx, False, True))
3620
+
3606
3621
  def do_view_rows(self) -> None:
3607
3622
  """View rows.
3608
3623
 
@@ -3712,7 +3727,7 @@ class DataFrameTable(DataTable):
3712
3727
  return
3713
3728
 
3714
3729
  # Add to history
3715
- self.add_history(f"Filtered by expression [$success]{expr_str}[/]")
3730
+ self.add_history(f"Viewed rows by expression [$success]{expr_str}[/]")
3716
3731
 
3717
3732
  ok_rids = set(df_filtered[RID])
3718
3733
 
@@ -3734,7 +3749,7 @@ class DataFrameTable(DataTable):
3734
3749
  # Recreate table for display
3735
3750
  self.setup_table()
3736
3751
 
3737
- self.notify(f"Filtered to [$success]{matched_count}[/] matching row(s)", title="View Rows")
3752
+ self.notify(f"Showing [$success]{matched_count}[/] matching row(s)", title="View Rows")
3738
3753
 
3739
3754
  def do_filter_rows(self) -> None:
3740
3755
  """Filter rows.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dataframe-textual
3
- Version: 2.7.0
3
+ Version: 2.8.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
@@ -358,6 +358,7 @@ zcat compressed_data.csv.gz | dv -f csv
358
358
  | Key | Action |
359
359
  |-----|--------|
360
360
  | `"` (quote) | Filter selected rows (others removed) |
361
+ | `.` | View rows with non-null values in current column (others hidden) |
361
362
  | `v` | View selected rows (others hidden) |
362
363
  | `V` | View selected by expression (others hidden) |
363
364
 
@@ -2,13 +2,13 @@ dataframe_textual/__init__.py,sha256=E53fW1spQRA4jW9grxSqPEmoe9zofzr6twdveMbt_W8
2
2
  dataframe_textual/__main__.py,sha256=tJ6FjjV25ZQzaMdqD5XcDVRZfj8l6kgGvXyrn975rjo,3999
3
3
  dataframe_textual/common.py,sha256=CNRdHP3N1li2dy9OsTiW-zfpzf8zcrt2fW8mmYY-YVA,29073
4
4
  dataframe_textual/data_frame_help_panel.py,sha256=UEtj64XsVRdtLzuwOaITfoEQUkAfwFuvpr5Npip5WHs,3381
5
- dataframe_textual/data_frame_table.py,sha256=IjsFc7aJJMAhfdf-898cTCMeDBvtnnDeRRV4cIdZQXY,147806
5
+ dataframe_textual/data_frame_table.py,sha256=wsVBvxnlHHOBFSRCgYmw4K1o2vCfvCnxpK8Bs5sYqOM,148430
6
6
  dataframe_textual/data_frame_viewer.py,sha256=_VwbCcRBgdTcrZmgS2mRwIJ-cFxOeJ55twDFvQUHMfk,28723
7
7
  dataframe_textual/sql_screen.py,sha256=P3j1Fv45NIKEYo9adb7NPod54FaU-djFIvCUMMHbvjY,7534
8
8
  dataframe_textual/table_screen.py,sha256=XPzJI6FXjwnxtQSMTmluygwkYM-0-Lx3v9o-MuL6bMg,19071
9
9
  dataframe_textual/yes_no_screen.py,sha256=NI7Zt3rETDWYiT5CH_FDy7sIWkZ7d7LquaZZbX79b2g,26400
10
- dataframe_textual-2.7.0.dist-info/METADATA,sha256=x5HmSx1U443HzBmNdKt0W3raGzcVTXFR4uaJXbKqKbE,29554
11
- dataframe_textual-2.7.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
12
- dataframe_textual-2.7.0.dist-info/entry_points.txt,sha256=R_GoooOxcq6ab4RaHiVoZ4zrZJ-phMcGmlL2rwqncW8,107
13
- dataframe_textual-2.7.0.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
14
- dataframe_textual-2.7.0.dist-info/RECORD,,
10
+ dataframe_textual-2.8.0.dist-info/METADATA,sha256=MzBgKLygHSXfzE9fspCmxZzcqQHnSDlKE6pi3bvL8ZU,29629
11
+ dataframe_textual-2.8.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
12
+ dataframe_textual-2.8.0.dist-info/entry_points.txt,sha256=R_GoooOxcq6ab4RaHiVoZ4zrZJ-phMcGmlL2rwqncW8,107
13
+ dataframe_textual-2.8.0.dist-info/licenses/LICENSE,sha256=AVTg0gk1X-LHI-nnHlAMDQetrwuDZK4eypgSMDO46Yc,1069
14
+ dataframe_textual-2.8.0.dist-info/RECORD,,