diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 5f8ab8966c1f0..b5941d343c5cb 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -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") diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 4b074924baaf2..15a84dc05d12a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -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 \ + `_. Returns -------