From ca9142868c3a23dfe0db894b0d522939dbf36b81 Mon Sep 17 00:00:00 2001 From: Alp Akpinar Date: Mon, 15 Jan 2024 19:57:57 -0500 Subject: [PATCH] EX03 fixes on dataframe.plot methods --- ci/code_checks.sh | 2 -- pandas/plotting/_core.py | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 145be3e52f2c0..3fd80b84da931 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -94,8 +94,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DataFrame.values \ pandas.DataFrame.groupby \ pandas.DataFrame.sort_values \ - pandas.DataFrame.plot.hexbin \ - pandas.DataFrame.plot.line \ RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 96609fdc1671b..f95dde948ae65 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1053,9 +1053,9 @@ def __call__(self, *args, **kwargs): over the years. >>> df = pd.DataFrame({ - ... 'pig': [20, 18, 489, 675, 1776], - ... 'horse': [4, 25, 281, 600, 1900] - ... }, index=[1990, 1997, 2003, 2009, 2014]) + ... 'pig': [20, 18, 489, 675, 1776], + ... 'horse': [4, 25, 281, 600, 1900] + ... }, index=[1990, 1997, 2003, 2009, 2014]) >>> lines = df.plot.line() .. plot:: @@ -1828,8 +1828,8 @@ def hexbin( >>> df = pd.DataFrame({ ... 'coord_x': np.random.uniform(-3, 3, size=n), ... 'coord_y': np.random.uniform(30, 50, size=n), - ... 'observations': np.random.randint(1,5, size=n) - ... }) + ... 'observations': np.random.randint(1, 5, size=n) + ... }) >>> ax = df.plot.hexbin(x='coord_x', ... y='coord_y', ... C='observations',