Project Icon

qsv

多功能高性能CSV数据处理工具集

qsv是一款高效的CSV数据处理工具,提供多样化的命令用于数据操作。主要功能包括查询、切片、索引、分析、过滤和转换CSV文件。它支持应用转换、日期格式化、去重、差异比较等高级操作,还能进行Web服务获取和地理编码。qsv内置Luau脚本引擎,可构建复杂的数据处理流程。其优化设计使其在处理大规模CSV数据时表现出色,兼具高性能和灵活性。

qsv: Blazing-fast CSV data-wrangling toolkit

Linux build status Windows build status macOS build status Security audit Codacy Badge Clones Discussions Crates.io Crates.io downloads Prebuilt Downloads Minimum supported Rust version FOSSA Status

 Table of Contents
qsv logo
Hi-ho "Quicksilver" away!
logo details
qsv is a command line program for querying, slicing,
indexing, analyzing, filtering, enriching, transforming,
sorting, validating, joining & converting CSV files.
Commands are simple, composable & "blazing fast".

* Commands
* Installation Options
* Whirlwind Tour / Notebooks / Lessons & Exercises
* Cookbook
* FAQ
* Performance Tuning
* 👉 Benchmarks 🚀
* Environment Variables
* Feature Flags
* Goals/Non-goals
* Testing
* NYC School of Data 2022/csv,conf,v8 slides
* Sponsor

Try it out at qsv.dathere.com!

CommandDescription
apply
✨🚀🧠🤖🔣👆
Apply series of string, date, math & currency transformations to given CSV column/s. It also has some basic NLP functions (similarity, sentiment analysis, profanity, eudex, language & name gender) detection.
applydp
🚀🔣👆 CKAN
applydp is a slimmed-down version of apply with only Datapusher+ relevant subcommands/operations (qsvdp binary variant only).
beheadDrop headers from a CSV.
cat
🗄️
Concatenate CSV files by row or by column.
clipboardProvide input from the clipboard or save output to the clipboard.
count
📇🏎️🐻‍❄️
Count the rows in a CSV file. (11.87 seconds for a 15gb, 27m row NYC 311 dataset without an index. Instantaneous with an index.) If the polars feature is enabled, uses Polars' multithreaded, mem-mapped CSV reader for fast counts even without an index
datefmt
🚀👆
Formats recognized date fields (19 formats recognized) to a specified date format using strftime date format specifiers.
dedup
🤯🚀👆
Remove duplicate rows (See also extdedup, extsort, sort & sortcheck commands).
describegpt
🌐🤖🪄
Infer extended metadata about a CSV using a GPT model from OpenAI's API or an LLM from another API compatible with the OpenAI API specification such as Ollama or Jan.
diff
🚀
Find the difference between two CSVs with ludicrous speed!
e.g. compare two CSVs with 1M rows x 9 columns in under 600ms!
enum
👆
Add a new column enumerating rows by adding a column of incremental or uuid identifiers. Can also be used to copy a column or fill a new column with a constant value.
excel
🚀
Exports a specified Excel/ODS sheet to a CSV file.
exclude
📇👆
Removes a set of CSV data from another set based on the specified columns.
explode
🔣👆
Explode rows into multiple ones by splitting a column value based on the given separator.
extdedup
Remove duplicate rows from an arbitrarily large CSV/text file using a memory-mapped, on-disk hash table. Unlike the dedup command, this command does not load the entire file into memory nor does it sort the deduped file.
extsort
🚀
Sort an arbitrarily large CSV/text file using a multithreaded external merge sort algorithm.
fetch
✨🧠🌐
Fetches data from web services for every row using HTTP Get. Comes with HTTP/2 adaptive flow control, jql JSON query language support, dynamic throttling (RateLimit) & caching with available persistent caching using Redis or a disk-cache.
fetchpost
✨🧠🌐
Similar to fetch, but uses HTTP Post. (HTTP GET vs POST methods)
fill
👆
Fill empty values.
fixlengthsForce a CSV to have same-length records by either padding or truncating them.
flattenA flattened view of CSV records. Useful for viewing one record at a time.
e.g. qsv slice -i 5 data.csv | qsv flatten.
fmtReformat a CSV with different delimiters, record terminators or quoting rules. (Supports ASCII delimited data.)
frequency
📇😣🏎️👆🪄
Build frequency tables of each column. Uses multithreading to go faster if an index is present.
geocode
✨🧠🌐🚀🔣👆
Geocodes a location against an updatable local copy of the Geonames cities database. With caching and multi-threading, it geocodes up to 360,000 records/sec!
headers
🗄️
Show the headers of a CSV. Or show the intersection of all headers between many CSV files.
indexCreate an index (📇) for a CSV. This is very quick (even the 15gb, 28m row NYC 311 dataset takes all of 14 seconds to index) & provides constant time indexing/random access into the CSV. With an index, count, sample & slice work instantaneously; random access mode is enabled in luau; and multithreading (🏎️) is enabled for the frequency, split, stats, schema & tojsonl commands.
inputRead CSV data with special commenting, quoting, trimming, line-skipping & non-UTF8 encoding handling rules. Typically used to "normalize" a CSV for further processing with other qsv commands.
join
👆
Inner, outer, right, cross, anti & semi joins. Automatically creates a simple, in-memory hash index to make it fast.
joinp
✨🚀🐻‍❄️
Inner, outer, right, cross, anti, semi & asof joins using the Pola.rs engine. Unlike the join command, joinp can process files larger than RAM, is multithreaded, has join key validation, pre-join filtering, supports asof joins (which is particularly useful for time series data) & its output columns can be coalesced. However, joinp doesn't have an --ignore-case option.
json
👆
Convert JSON to CSV.
jsonl
🚀🔣
Convert newline-delimited JSON (JSONL/NDJSON) to CSV. See tojsonl command to convert CSV to JSONL.

luau 👑
✨📇🌐🔣 CKAN
Create multiple new computed columns, filter rows, compute aggregations and build complex data pipelines by executing a Luau 0.635 expression/script for every row of a CSV file (sequential mode), or using random access with an index (random access mode).
Can process a single Luau expression or full-fledged data-wrangling scripts using lookup tables with discrete BEGIN, MAIN and END sections.
It is not just another qsv command, it is qsv's Domain-specific Language (DSL) with numerous qsv-specific helper functions to build production data pipelines.
partition
👆
Partition a CSV based on a column value.
promptOpen a file dialog to either pick a file as input or save output to a file.
pseudo
🔣👆
Pseudonymise the value of the given column by replacing them with an incremental identifier.
py
✨🔣
Create a new computed column or filter rows by evaluating a python expression on every row of a CSV file. Python's f-strings is particularly useful for extended formatting, [with the ability to evaluate Python expressions as
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

稿定AI

稿定设计 是一个多功能的在线设计和创意平台,提供广泛的设计工具和资源,以满足不同用户的需求。从专业的图形设计师到普通用户,无论是进行图片处理、智能抠图、H5页面制作还是视频剪辑,稿定设计都能提供简单、高效的解决方案。该平台以其用户友好的界面和强大的功能集合,帮助用户轻松实现创意设计。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号