# 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
```bash
pip install mdpd
```
## usage
```python
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
```
```python
# 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
```markdown
| Syntax | Description |
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
```
```markdown
+------------+-------------+
| Syntax | Description |
+------------+-------------+
| Header | Title |
| Paragraph | Text |
+------------+-------------+
```
```markdown
| Syntax | Description |
| :-------- | ----------: |
| Header | Title |
| Paragraph | Text |
```
```markdown
| 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/kyoto7250/mdpd",
"name": "mdpd",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.13",
"maintainer_email": "",
"keywords": "padnas,markdown,table,test,development",
"author": "kyoto7250",
"author_email": "50972773+kyoto7250@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/2f/ec/b31ac809b79e1baa0550e60325273ef437fdde77a65aaa68bdc2b3e82ef9/mdpd-0.2.1.tar.gz",
"platform": null,
"description": "# mdpd\n`mdpd` is a simpler tool for convert markdown table to pandas.\nThis tool is a lightweight tool for testing a code, so note that we are not validating the user's input.\n\n## install\n```bash\npip install mdpd\n```\n\n## usage\n\n```python\nimport mdpd\n\ndf = mdpd.from_md(\"\"\"\n+------------+-------+\n| id | score |\n+------------+-------+\n| 1 | 15 |\n| 2 | 11 |\n| 3 | 11 |\n| 4 | 20 |\n+------------+-------+\n\"\"\")\n\nprint(df)\n# id score\n# 0 1 15\n# 1 2 11\n# 2 3 11\n# 3 4 20\n```\n\n```python\n# the header can be overwritten if the header exists\nimport mdpd\ndf = mdpd.from_md(\"\"\"\n| 1 | 15 |\n| 2 | 11 |\n| 3 | 11 |\n| 4 | 20 |\n\"\"\", header=[\"id\", \"score\"])\n\nprint(df)\n# id score\n# 0 1 15\n# 1 2 11\n# 2 3 11\n# 3 4 20\n```\n\n\n## accepted table patterns\n\n```markdown\n| Syntax | Description |\n| --------- | ----------- |\n| Header | Title |\n| Paragraph | Text |\n```\n\n```markdown\n+------------+-------------+\n| Syntax | Description |\n+------------+-------------+\n| Header | Title |\n| Paragraph | Text |\n+------------+-------------+\n```\n\n```markdown\n| Syntax | Description |\n| :-------- | ----------: |\n| Header | Title |\n| Paragraph | Text |\n```\n\n```markdown\n| Header | Title |\n| Paragraph | Text |\n```\n\n## contribute\nIf you have suggestions for features or improvements to the code, please feel free to create an issue or PR.\n",
"bugtrack_url": null,
"license": "",
"summary": "a simpler tool for convert markdown table to pandas",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/kyoto7250/mdpd",
"Repository": "https://github.com/kyoto7250/mdpd"
},
"split_keywords": [
"padnas",
"markdown",
"table",
"test",
"development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d79cf8c498687901bf5c39e05015ea17e689d7f5e68b19a0d5e0c22edb309997",
"md5": "1da51f13a4bb5024babf3331afb0fa37",
"sha256": "7735776f1fa96ac318e89e536aa0e8a9a896163e042d57b1e1c43298d6f6fc26"
},
"downloads": -1,
"filename": "mdpd-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1da51f13a4bb5024babf3331afb0fa37",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.13",
"size": 3449,
"upload_time": "2023-10-15T08:04:37",
"upload_time_iso_8601": "2023-10-15T08:04:37.099449Z",
"url": "https://files.pythonhosted.org/packages/d7/9c/f8c498687901bf5c39e05015ea17e689d7f5e68b19a0d5e0c22edb309997/mdpd-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2fecb31ac809b79e1baa0550e60325273ef437fdde77a65aaa68bdc2b3e82ef9",
"md5": "c586689724c0c61befc744a49de393d5",
"sha256": "041bcd0faabddc8982f70432b71ebe033442f6d495ae4026678ace1b8c4f9897"
},
"downloads": -1,
"filename": "mdpd-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "c586689724c0c61befc744a49de393d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.13",
"size": 2834,
"upload_time": "2023-10-15T08:04:38",
"upload_time_iso_8601": "2023-10-15T08:04:38.646324Z",
"url": "https://files.pythonhosted.org/packages/2f/ec/b31ac809b79e1baa0550e60325273ef437fdde77a65aaa68bdc2b3e82ef9/mdpd-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-15 08:04:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kyoto7250",
"github_project": "mdpd",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mdpd"
}