DataFrame to GitHub markdown table
Project description
A function to convert DataFrames to GitHub markdown
pip install dftogithubmarkdown
from dftogithubmarkdown import to_git_markdown
print(to_git_markdown(df, max_col_width=30, max_rows=-1))
"""
Convert a pandas DataFrame to a GitHub-flavored markdown table string.
Parameters:
df (pd.DataFrame): The DataFrame to convert.
max_col_width (int): Maximum width for each column in the markdown table. Default is 30.
max_rows (int): Maximum number of rows to include in the table. If -1, include all rows.
Returns:
str: A string representing the DataFrame in GitHub-flavored markdown table format.
"""
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dftogithubmarkdown-0.10.tar.gz.
File metadata
- Download URL: dftogithubmarkdown-0.10.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d2fe35a0002083da843e62296abc43b55df818182fe7c34c6bae0cbba36e05
|
|
| MD5 |
c8c47c94733881086a02198589c8ae96
|
|
| BLAKE2b-256 |
b83e7dc29f39d8e99912e8f609ebf37ce66158340abca5c21a2fe5053b09f400
|
File details
Details for the file dftogithubmarkdown-0.10-py3-none-any.whl.
File metadata
- Download URL: dftogithubmarkdown-0.10-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8260cd8bb11e52860ac87f32c8117bac5f3b32f7e18d8008cd48c30c4d927dfa
|
|
| MD5 |
6e506efd561125416d1093880f8d6357
|
|
| BLAKE2b-256 |
4f05e55861b478ed0549430353c29e7b498f03a0d6ffea079b1b3d6cde7f59cd
|