numpytable
每次复制Excel表格的数据到Python中,都要手动添加括号和逗号,非常繁琐。
目的:快速将Excel等工具复制的表格文本转换为NumPy数组,告别手动添加括号和逗号的繁琐操作。
安装
pip install numpytable
用法
-
在Excel(或其他表格工具)中选中数据并复制(元素间默认用制表符分隔):
2.2681 6.623 2.6459 2.3407 6.574 2.1304 2.8451 6.4258 2.1178 -
在Python中用
from_table函数转换:import numpy as np from numpytable import from_table # 直接粘贴复制的文本,用三引号包裹 data = np.array(from_table(""" 2.2681 6.623 2.6459 2.3407 6.574 2.1304 2.8451 6.4258 2.1178 """)) print(data) # 输出: # [[2.2681 6.623 2.6459] # [2.3407 6.574 2.1304] # [2.8451 6.4258 2.1178]]
特性
- 自动处理换行和制表符,无需手动格式化
- 支持整数、浮点数自动识别
- 检测并警告行数不一致的情况
- 轻量依赖(仅需numpy)
Metadata
Release files for numpytable 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| numpytable-0.1.0.tar.gz | 4.3 kB | Without provenance | Details for numpytable-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| numpytable-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for numpytable-0.1.0-py3-none-any.whl |
Total release size: 8.8 kB
Release files / numpytable-0.1.0.tar.gz
| Download URL | numpytable-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac915ea4d3a41757ab8d0dcbcc2944bef5460539d4272f0b173a924780cde567
|
|
BLAKE2b-256 checksum How to use checksums |
25e10a76f62ea1ddd48f6788d4375e7e17903d4f37dcaa992da0107c382b49d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.2
|
Release files / numpytable-0.1.0-py3-none-any.whl
| Download URL | numpytable-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
760cf6175066d459d4c86b3aa2f65ecb28c26ce3443bd4e3359eb0660882c9c8
|
|
BLAKE2b-256 checksum How to use checksums |
02eb99d9bff7ea7a46a72c8c996273a1f290736c3b6e8064f0b4841a70d26c7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.2
|
Security for numpytable 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.