Skip to main content

An enhanced CSV processing library with more features

Project description

morecsv

morecsv 是一个增强型的 CSV 处理库,旨在为用户提供更便捷、高效的 CSV 文件处理方式,支持自动数据类型处理、多线程读写、数据清洗等功能。 同时,morecsv 也支持将数据画出来

安装

你可以使用 pip 来安装 morecsv

pip install morecsv

使用示例

读取 CSV 文件

import morecsv

# 初始化 CSVProcessor 对象
file = morecsv.CSVProcessor('example.csv')

# 读取 CSV 文件
file.get(empty=True)

添加列

file.add_columns(['new_col1', 'new_col2'])

删除列

file.del_columns('column_to_delete')

多线程保存数据

file.save_data_multithreaded()

填充NaN数据

file.fillna('column', value=10)

画图

plot = Plot(file)
plot.plot('x', 'y')
plot.show()

功能特性

自动数据类型处理

在读取 CSV 文件时,自动推断数据类型,如将字符串转换为合适的数值类型。

多线程读写

支持多线程读取和写入 CSV 文件,提高处理大量数据时的性能。

数据操作

  • 添加列:可灵活添加单个或多个列,支持处理重复列名的情况。
  • 删除列:方便地删除指定列。

数据保存

  • 支持单线程和多线程保存数据到 CSV 文件,多线程保存可加快大文件的保存速度。

画图

  • 目前仅支持折线图,会在后续版本增加

API 文档

API 文档正在全面升级!~

贡献指南

如果你想为 morecsv 项目做出贡献,请遵循以下步骤:

  1. Fork 本项目。
  2. 创建一个新的分支:git checkout -b feature/your-feature-name
  3. 提交你的更改:git commit -m 'Add some feature'
  4. 推送至分支:git push origin feature/your-feature-name
  5. 提交 Pull Request。

许可证

本项目采用 MIT 许可证。 If the superlink doesn't work, please see the GitHub repo.

更新日志

  • v0.4.0 Release: Logging implemented; Basic plotting class built-in main class; Tiny bug fix; Fixed the testings, for old tests please see older versions.
  • v0.3.0 Release: Brainstorms (See source code and you'll know); New functions; Tiny bug fix.
  • v0.2.0 Release: Minor bug fix; New functions.

I really should offer a full Chinese and full English version of this...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

morecsv-0.4.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morecsv-0.4.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file morecsv-0.4.0.tar.gz.

File metadata

  • Download URL: morecsv-0.4.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for morecsv-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a6021f609302ec6ca47cf3c5f4d36e9f240e9f9818b8bbe7fde7056e54ba0edc
MD5 18cd7501169ad5a5269d6e9d3bb87d6d
BLAKE2b-256 3bb8f3c31b44eefc65d7dd5f60e8afa824dc405ca822f4b0adc32cb208f66212

See more details on using hashes here.

File details

Details for the file morecsv-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: morecsv-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for morecsv-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b85505b36800ff25fb4e00ac844d5add92923b63d24643da15930000bbb8b21
MD5 d00515bd7e96f6a1b04b3ceb6b4b3f74
BLAKE2b-256 678e7f9516f0685588ca008316422d499ef00c40afcb66efbd7936476f0c48a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page