funmd
funmd 是一个 Markdown 表格与 pandas.DataFrame 互转的轻量工具,提供 to_pandas / from_pandas 两个函数,兼容 | 和 + 两种 Markdown 表格分隔风格。
安装
uv add funmd
# 或
pip install funmd
请使用
0.1.3或更高版本。0.1.2的发布元数据没有声明pandas/tabulate, 装上后import funmd会报ModuleNotFoundError: pandas。
快速开始
from funmd import to_pandas, from_pandas
table = """
| foo | bar |
| --- | --- |
| 1 | 2 |
| 3 | 4 |
"""
df = to_pandas(table)
print(df)
# foo bar
# 0 1 2
# 1 3 4
markdown = from_pandas(df, index=False)
print(markdown)
# | foo | bar |
# |:------|:------|
# | 1 | 2 |
# | 3 | 4 |
to_pandas 也支持 +-----+-----+ 风格的分隔线,以及通过 header 参数显式指定列名(覆盖表格中检测到的表头行)。
关于 farfarfun
farfarfun 是一个专注于实用工具库的开源组织, 涵盖云存储、数据处理、AI、多媒体与开发工具链等方向。
- 🏠 组织主页:https://github.com/farfarfun
- 📦 PyPI:https://pypi.org/user/niuliangtao/
- 📧 联系:farfarfun@qq.com
本项目基于 MIT 协议开源。
Metadata
Release files for funmd 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| funmd-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / funmd-0.1.3-py3-none-any.whl
| Download URL | funmd-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b65321c54a24e6319054b138228919d34a96fa020c0641383a2f47a28a04398d
|
|
BLAKE2b-256 checksum How to use checksums |
99ffed5e9773cd677bd94daebf681dfa578c6d9b81ddd9c5dce63119d43d875c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for funmd 0.1.3
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.