diff --git a/pandas/core/series.py b/pandas/core/series.py index 6b5ed86027806..0ed29fcaaa081 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1422,6 +1422,21 @@ def to_string( | 1 | pig | | 2 | dog | | 3 | quetzal | + + Output markdown with a tabulate option. + + >>> print(s.to_markdown(tablefmt="grid")) + +----+----------+ + | | animal | + +====+==========+ + | 0 | elk | + +----+----------+ + | 1 | pig | + +----+----------+ + | 2 | dog | + +----+----------+ + | 3 | quetzal | + +----+----------+ """ ) @Substitution(klass="Series")