feat(dc/tool-c): Add missing value imputation feature with 6 methods and MICE
Major features: 1. Missing value imputation (6 simple methods + MICE): - Mean/Median/Mode/Constant imputation - Forward fill (ffill) and Backward fill (bfill) for time series - MICE multivariate imputation (in progress, shape issue to fix) 2. Auto precision detection: - Automatically match decimal places of original data - Prevent false precision (e.g. 13.57 instead of 13.566716417910449) 3. Categorical variable detection: - Auto-detect and skip categorical columns in MICE - Show warnings for unsuitable columns - Suggest mode imputation for categorical data 4. UI improvements: - Rename button: "Delete Missing" to "Missing Value Handling" - Remove standalone "Dedup" and "MICE" buttons - 3-tab dialog: Delete / Fill / Advanced Fill - Display column statistics and recommended methods - Extended warning messages (8 seconds for skipped columns) 5. Bug fixes: - Fix sessionService.updateSessionData -> saveProcessedData - Fix OperationResult interface (add message and stats) - Fix Toolbar button labels and removal Modified files: Python: operations/fillna.py (new, 556 lines), main.py (3 new endpoints) Backend: QuickActionService.ts, QuickActionController.ts, routes/index.ts Frontend: MissingValueDialog.tsx (new, 437 lines), Toolbar.tsx, index.tsx Tests: test_fillna_operations.py (774 lines), test scripts and docs Docs: 5 documentation files updated Known issues: - MICE imputation has DataFrame shape mismatch issue (under debugging) - Workaround: Use 6 simple imputation methods first Status: Development complete, MICE debugging in progress Lines added: ~2000 lines across 3 tiers
This commit is contained in:
@@ -113,7 +113,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
/>
|
||||
<ToolbarButton
|
||||
icon={Trash2}
|
||||
label="删除缺失值"
|
||||
label="缺失值处理"
|
||||
colorClass="text-red-600 bg-red-50 hover:bg-red-100"
|
||||
onClick={onDropnaClick}
|
||||
disabled={!sessionId}
|
||||
@@ -125,13 +125,6 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
onClick={onComputeClick}
|
||||
disabled={!sessionId}
|
||||
/>
|
||||
<ToolbarButton
|
||||
icon={FileSearch}
|
||||
label="去重"
|
||||
colorClass="text-orange-600 bg-orange-50 hover:bg-orange-100"
|
||||
onClick={onDedupClick}
|
||||
disabled={true}
|
||||
/>
|
||||
|
||||
<div className="w-[1px] h-8 bg-slate-200 mx-2"></div>
|
||||
|
||||
@@ -143,13 +136,6 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
onClick={onPivotClick}
|
||||
disabled={!sessionId}
|
||||
/>
|
||||
<ToolbarButton
|
||||
icon={CalendarClock}
|
||||
label="多重插补"
|
||||
colorClass="text-rose-600 bg-rose-50 hover:bg-rose-100"
|
||||
onClick={onMiceClick}
|
||||
disabled={true}
|
||||
/>
|
||||
|
||||
<div className="flex-1"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user