为什么从 CSV 开始Why Start With CSV

几乎所有数据源(数据库导出、网页抓取、业务系统)都能导出 CSV,而几乎所有分析工具都能读它。CSV 就是数据分析的"普通话"。

Almost every data source (DB exports, scrapes, business systems) can emit CSV, and nearly every analytical tool reads it. CSV is the "lingua franca" of data analysis.

流程一:Excel 透视表(零代码)Flow 1: Excel Pivot Tables (No Code)

  1. 用 导入向导 正确打开 CSV。
  2. 插入"数据透视表",按维度拖拽做求和、计数、平均。
  3. 用"条件格式"或图表做初步可视化。
  1. Open the CSV correctly with the import wizard.
  2. Insert a PivotTable and drag dimensions to sum, count or average.
  3. Use conditional formatting or charts for a first visualization.

流程二:Python pandas(可复用脚本)Flow 2: Python pandas (Reusable Scripts)

pandas 是事实上的数据分析标准库,几行就能完成读取、清洗与分组统计:

pandas is the de-facto analytics library; a few lines do read, clean and group-by:

import pandas as pd
df = pd.read_csv("data.csv", encoding="utf-8")
print(df.groupby("城市")["金额"].sum())

再用 matplotlib 或 seaborn 画图,用 CSV 转 PDF 的思路导出结果报表。

Then plot with matplotlib or seaborn, and export result reports (see the CSV to PDF idea).

流程三:命令行(大文件友好)Flow 3: Command Line (Big-File Friendly)

对超大文件,csvkit、awk、duckdb 能流式处理。先 了解大文件策略,再做统计。

For huge files, csvkit, awk and duckdb stream-process efficiently. Learn big-file strategies first, then compute.

分析前先清洗:重复值、空格、空列会严重误导结论。建议先用 数据清洗 10 技巧 与 去重 预处理,再分析。
Clean before you analyze: Duplicates, spaces and empty columns mislead conclusions. Pre-process with the 10 cleaning tips and dedupe first.

想马上试试?打开在线工具先做清洗与转换,再把干净数据交给分析流程,全程本地处理。

Want to try now? Open the toolkit to clean and convert first, then feed clean data to your analysis — locally, no upload.

打开 CSV 工具箱 →Open the CSV Toolkit →