Skip to content

Improve document for **kwargs argument of pandas.DataFrame.to_markdown #34594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,17 @@ def to_feather(self, path, **kwargs) -> None:
|---:|:-----------|:-----------|
| 0 | elk | dog |
| 1 | pig | quetzal |

Output markdown with a tabulate option.

>>> print(df.to_markdown(tablefmt="grid"))
+----+------------+------------+
| | animal_1 | animal_2 |
+====+============+============+
| 0 | elk | dog |
+----+------------+------------+
| 1 | pig | quetzal |
+----+------------+------------+
"""
)
@Substitution(klass="DataFrame")
Expand Down
3 changes: 2 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,8 @@ def _repr_data_resource_(self):
mode : str, optional
Mode in which file is opened.
**kwargs
These parameters will be passed to `tabulate`.
These parameters will be passed to `tabulate \
<https://pypi.org/project/tabulate>`_.

Returns
-------
Expand Down