Metadata-Version: 2.1
Name: numpytable
Version: 0.1.0
Summary: 快速将Excel复制的表格文本转换为NumPy数组
Home-page: https://github.com/Knighthood2001/numpytable
Author: knighthood2001
Author-email: 2109695291@qq.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.19.0

# numpytable
每次复制Excel表格的数据到Python中，都要手动添加括号和逗号，非常繁琐。

目的：快速将Excel等工具复制的表格文本转换为NumPy数组，告别手动添加括号和逗号的繁琐操作。

## 安装

```bash
pip install numpytable
```

## 用法

1. 在Excel（或其他表格工具）中选中数据并复制（元素间默认用制表符分隔）：
   ```
   2.2681	6.623	2.6459
   2.3407	6.574	2.1304
   2.8451	6.4258	2.1178
   ```

2. 在Python中用`from_table`函数转换：
   ```python
   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）


