mdpd
mdpd is a simpler tool for convert markdown table to pandas.
This tool is a lightweight tool for testing a code, so note that we are not validating the user's input.
install
pip install mdpd
usage
import mdpd
df = mdpd.from_md("""
+------------+-------+
| id | score |
+------------+-------+
| 1 | 15 |
| 2 | 11 |
| 3 | 11 |
| 4 | 20 |
+------------+-------+
""")
print(df)
# id score
# 0 1 15
# 1 2 11
# 2 3 11
# 3 4 20
# the header can be overwritten if the header exists
import mdpd
df = mdpd.from_md("""
| 1 | 15 |
| 2 | 11 |
| 3 | 11 |
| 4 | 20 |
""", header=["id", "score"])
print(df)
# id score
# 0 1 15
# 1 2 11
# 2 3 11
# 3 4 20
accepted table patterns
| Syntax | Description |
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
+------------+-------------+
| Syntax | Description |
+------------+-------------+
| Header | Title |
| Paragraph | Text |
+------------+-------------+
| Syntax | Description |
| :-------- | ----------: |
| Header | Title |
| Paragraph | Text |
| Header | Title |
| Paragraph | Text |
contribute
If you have suggestions for features or improvements to the code, please feel free to create an issue or PR.
Metadata
Release files for mdpd 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdpd-0.2.1.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdpd-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / mdpd-0.2.1.tar.gz
| Download URL | mdpd-0.2.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
041bcd0faabddc8982f70432b71ebe033442f6d495ae4026678ace1b8c4f9897
|
|
BLAKE2b-256 checksum How to use checksums |
2fecb31ac809b79e1baa0550e60325273ef437fdde77a65aaa68bdc2b3e82ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.13 Linux/6.2.0-1012-azure
|
Release files / mdpd-0.2.1-py3-none-any.whl
| Download URL | mdpd-0.2.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7735776f1fa96ac318e89e536aa0e8a9a896163e042d57b1e1c43298d6f6fc26
|
|
BLAKE2b-256 checksum How to use checksums |
d79cf8c498687901bf5c39e05015ea17e689d7f5e68b19a0d5e0c22edb309997
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.9.13 Linux/6.2.0-1012-azure
|