New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-csv-explorer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-csv-explorer

CSV explorer for DeepSeek Harness: delimiter-aware preview with row counts and numeric column statistics. Lightweight, no Excel parsing.

npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

dsh-csv-explorer

CSV 数据探查插件(v0.1.0):分隔符感知的预览与数值列统计。轻量设计,不解析 Excel 二进制格式。

安装

npm install dsh-csv-explorer

工具

csv_preview

参数类型说明
text / filestring源内容二选一(file 须在工作目录内)
rowsnumber预览行数(默认 5,上限 50)
delimiterstring可选,显式分隔符;缺省自动嗅探(, ; \t | 取前 10 行众数)

输出:分隔符、总行数、列数 + Markdown 表格预览。自动处理 BOM 与 CRLF;引号内分隔符正确切分(csv-parse);短行补齐、长行截断到表头宽度;空表头自动命名 列N。

csv_stats

参数类型说明
columnsarray可选,列名或 0 基下标;缺省统计全部数值列
text / filestring源内容二选一
delimiterstring可选,显式分隔符

数值识别:支持千分位(1,200.50)、百分号(85%)、货币符号前后缀(¥99、$1,000)、科学计数法。

每列输出:count(数值单元格数)、非数值个数、min / max / mean / median(偶数行取均值)/ std(总体标准差)/ sum。非数值列标注跳过。

限制

  • 输入上限 2MB / 5 万行(超出部分不计入统计并明确提示)
  • 文件路径必须在工作目录内
  • 不解析 Excel(.xlsx)二进制;需要时先转 CSV
  • 唯一依赖 csv-parse(健壮的 RFC4180 解析)

测试

npm test

覆盖 4 种分隔符嗅探、引号切分、BOM/CRLF、短长行对齐、9 例数值识别、列名/下标选列、统计口径(中位数/标准差)、路径越界拒绝等 45 项断言。

Roadmap(v0.2 候选)

  • 按列值过滤行(filter 工具)
  • 分类列的频次统计(top N)
  • 大文件流式统计(当前全量载入内存)

Keywords

dsh

FAQs

Package last updated on 11 Sep 2026

Related posts