From f2e696318225648a115ffbee3e39dbacddbc8e15 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Wed, 7 Oct 2020 11:47:05 +0300 Subject: [PATCH 1/5] Update to_markdown documentation Adding to the documentation that tabulate is required for to_markdown to be executed --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 2b972d33d7cdd..6078aa878bfc9 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1437,7 +1437,7 @@ def to_markdown( **kwargs, ) -> Optional[str]: """ - Print {klass} in Markdown-friendly format. + Print {klass} in Markdown-friendly format (requires the tabulate package). .. versionadded:: 1.0.0 From 167f44a606b223d098bd59a36b2b5d970bd5d4f0 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Sat, 17 Oct 2020 10:31:31 +0300 Subject: [PATCH 2/5] Move the optional dependency to a note --- pandas/core/series.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 6078aa878bfc9..dd62b92a94f3e 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1437,7 +1437,7 @@ def to_markdown( **kwargs, ) -> Optional[str]: """ - Print {klass} in Markdown-friendly format (requires the tabulate package). + Print {klass} in Markdown-friendly format. .. versionadded:: 1.0.0 @@ -1471,6 +1471,10 @@ def to_markdown( str {klass} in Markdown-friendly format. + Notes + ----- + This method requires the tabulate package. + Examples -------- >>> s = pd.Series(["elk", "pig", "dog", "quetzal"], name="animal") From ae7fa8b198b3d3b11681a7f9a84fda70937954d8 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Sat, 17 Oct 2020 11:04:45 +0300 Subject: [PATCH 3/5] Update series.py --- pandas/core/series.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index dd62b92a94f3e..01939dc68c926 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1473,7 +1473,9 @@ def to_markdown( Notes ----- - This method requires the tabulate package. + This method requires the `tabulate package + `_. + Examples -------- From 2db6416d4ffbc884f442d6f16fd5b16d6d716e28 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Sat, 17 Oct 2020 11:41:17 +0300 Subject: [PATCH 4/5] Update series.py --- pandas/core/series.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 01939dc68c926..4700dbd48af3f 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1476,7 +1476,6 @@ def to_markdown( This method requires the `tabulate package `_. - Examples -------- >>> s = pd.Series(["elk", "pig", "dog", "quetzal"], name="animal") From 274b886a66eda490f3403ca619d54fd05108b05d Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Sat, 17 Oct 2020 11:51:57 +0300 Subject: [PATCH 5/5] Update pandas/core/series.py Co-authored-by: Marco Gorelli --- pandas/core/series.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 4700dbd48af3f..db274f37f5889 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1473,8 +1473,7 @@ def to_markdown( Notes ----- - This method requires the `tabulate package - `_. + Requires the `tabulate `_ package. Examples --------