jupyterlab_tabular_data_viewer_extension 1.2.8 → 1.2.11

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.
package/README.md CHANGED
@@ -14,6 +14,16 @@ View and browse Parquet, Excel, CSV, and TSV files directly in JupyterLab. Doubl
14
14
 
15
15
  ![Open With Menu](.resources/screenshot-menu.png)
16
16
 
17
+ **Column statistics:** Hover over any column header to reveal an info icon, click it to view comprehensive statistics.
18
+
19
+ ![Column Statistics Icon](.resources/screenshot-stats-icon.png)
20
+
21
+ ![Column Statistics Modal](.resources/screenshot-stats.png)
22
+
23
+ **Context menu:** Right-click any row to copy data as JSON.
24
+
25
+ ![Copy Row as JSON](.resources/screenshot-copy-json.png)
26
+
17
27
  ## Features
18
28
 
19
29
  **Supported File Formats:**
@@ -40,12 +50,7 @@ View and browse Parquet, Excel, CSV, and TSV files directly in JupyterLab. Doubl
40
50
  - Multiple filters work together to narrow down results
41
51
 
42
52
  **Additional features:**
43
- - Column statistics modal - Hover over any column header to reveal an info icon, click it to view comprehensive statistics including data type, row counts, null values, unique counts, and type-specific metrics (numeric: min/max/mean/median/std dev/outliers using IQR×1.5; string: most common value/length stats; date: earliest/latest dates). Copy statistics as JSON with one click
44
-
45
- ![Column Statistics Icon](.resources/screenshot-stats-icon.png)
46
-
47
- ![Column Statistics Modal](.resources/screenshot-stats.png)
48
-
53
+ - Column statistics modal - View comprehensive statistics including data type, row counts, null values, unique counts, and type-specific metrics (numeric: min/max/mean/median/std dev/outliers using IQR×1.5; string: most common value/length stats; date: earliest/latest dates). Copy statistics as JSON with one click
49
54
  - Right-click context menu on rows to copy data as JSON
50
55
  - Configurable file type support via Settings - Enable/disable Parquet, Excel, or CSV/TSV handling
51
56
  - All features work seamlessly across all supported file formats
package/lib/modal.js CHANGED
@@ -90,12 +90,6 @@ export class ColumnStatsModal extends Widget {
90
90
  }
91
91
  // String statistics
92
92
  if (this._stats.data_type === 'string') {
93
- const stringSection = document.createElement('div');
94
- stringSection.className = 'jp-ColumnStatsModal-section';
95
- const stringTitle = document.createElement('h4');
96
- stringTitle.textContent = 'String Statistics';
97
- stringSection.appendChild(stringTitle);
98
- const stringList = document.createElement('ul');
99
93
  const items = [];
100
94
  if (this._stats.most_common_value !== undefined) {
101
95
  items.push(`Most common: "${this._stats.most_common_value}" (${this._stats.most_common_count})`);
@@ -109,9 +103,18 @@ export class ColumnStatsModal extends Widget {
109
103
  if (this._stats.avg_length !== undefined) {
110
104
  items.push(`Avg length: ${this._formatNumber(this._stats.avg_length)} characters`);
111
105
  }
112
- stringList.innerHTML = items.map(item => `<li>${item}</li>`).join('');
113
- stringSection.appendChild(stringList);
114
- content.appendChild(stringSection);
106
+ // Only show section if we have stats to display
107
+ if (items.length > 0) {
108
+ const stringSection = document.createElement('div');
109
+ stringSection.className = 'jp-ColumnStatsModal-section';
110
+ const stringTitle = document.createElement('h4');
111
+ stringTitle.textContent = 'String Statistics';
112
+ stringSection.appendChild(stringTitle);
113
+ const stringList = document.createElement('ul');
114
+ stringList.innerHTML = items.map(item => `<li>${item}</li>`).join('');
115
+ stringSection.appendChild(stringList);
116
+ content.appendChild(stringSection);
117
+ }
115
118
  }
116
119
  // Date/datetime statistics
117
120
  if (this._stats.data_type === 'date' || this._stats.data_type === 'datetime') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_tabular_data_viewer_extension",
3
- "version": "1.2.8",
3
+ "version": "1.2.11",
4
4
  "description": "Jupyterlab extension to browse tabular data files (Parquet, Excel, CSV, TSV) with filtering and sorting capabilities",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/modal.ts CHANGED
@@ -105,13 +105,6 @@ export class ColumnStatsModal extends Widget {
105
105
 
106
106
  // String statistics
107
107
  if (this._stats.data_type === 'string') {
108
- const stringSection = document.createElement('div');
109
- stringSection.className = 'jp-ColumnStatsModal-section';
110
- const stringTitle = document.createElement('h4');
111
- stringTitle.textContent = 'String Statistics';
112
- stringSection.appendChild(stringTitle);
113
-
114
- const stringList = document.createElement('ul');
115
108
  const items: string[] = [];
116
109
 
117
110
  if (this._stats.most_common_value !== undefined) {
@@ -127,9 +120,19 @@ export class ColumnStatsModal extends Widget {
127
120
  items.push(`Avg length: ${this._formatNumber(this._stats.avg_length)} characters`);
128
121
  }
129
122
 
130
- stringList.innerHTML = items.map(item => `<li>${item}</li>`).join('');
131
- stringSection.appendChild(stringList);
132
- content.appendChild(stringSection);
123
+ // Only show section if we have stats to display
124
+ if (items.length > 0) {
125
+ const stringSection = document.createElement('div');
126
+ stringSection.className = 'jp-ColumnStatsModal-section';
127
+ const stringTitle = document.createElement('h4');
128
+ stringTitle.textContent = 'String Statistics';
129
+ stringSection.appendChild(stringTitle);
130
+
131
+ const stringList = document.createElement('ul');
132
+ stringList.innerHTML = items.map(item => `<li>${item}</li>`).join('');
133
+ stringSection.appendChild(stringList);
134
+ content.appendChild(stringSection);
135
+ }
133
136
  }
134
137
 
135
138
  // Date/datetime statistics