feat: djapi 数据源归一化 + bug 修复 + 废弃 getDivData_AK
- 新增 djapi/api/stock/data_source.py 统一数源入口 (Tushare 单例) - 迁移 10 个模块至统一数据源入口 - 废弃 getDivData_AK.py - 修复 getStockDiv2.py / smoothBrush.py 等模块 - indexDatas API 参数 tscode 类型修正 (股票→指数代码) - views.py + urls.py 接口清理 - continuation.md 状态更新 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -90,9 +90,9 @@ def smooth_series_brush(series: pd.Series, window_size: int = 7, threshold_facto
|
||||
|
||||
# 决定使用哪个值填充
|
||||
if prev_valid_val is not None:
|
||||
fill_value = next_valid_val
|
||||
elif next_valid_val is not None:
|
||||
fill_value = prev_valid_val
|
||||
elif next_valid_val is not None:
|
||||
fill_value = next_valid_val
|
||||
else:
|
||||
print(f"警告: 毛刺段 {brush_indices} 无有效邻居,使用全局中位数填充。")
|
||||
fill_value = series.median()
|
||||
|
||||
Reference in New Issue
Block a user