Repository: databricks/koalas

Issue:
Support pandas 0.25.
Seems like we don't support pandas 0.25 related to plot functions so far.
https://travis-ci.com/databricks/koalas/jobs/217695045


Discussion:
Hi @dvgodoy,
Could you take a look at this and help us support pandas 0.25?
Thanks!

Resolving patch:
diff --git a/databricks/koalas/plot.py b/databricks/koalas/plot.py
--- a/databricks/koalas/plot.py
+++ b/databricks/koalas/plot.py
@@ -20,17 +20,34 @@
 import pandas as pd
 
 from matplotlib.axes._base import _process_plot_format
+from pandas.core.dtypes.inference import is_integer, is_list_like
 from pandas.io.formats.printing import pprint_thing
-from pandas.plotting._core import (
-    _all_kinds, _get_standard_kind, _gca, BarPlot, BasePlotMethods, BoxPlot, HistPlot,
-    is_list_like,
-    is_integer, MPLPlot)
+from pandas.core.base import PandasObject
 
 from databricks.koalas.missing import _unsupported_function
 from pyspark.ml.feature import Bucketizer
 from pyspark.sql import functions as F
 
 
+def _gca(rc=None):
+    import matplotlib.pyplot as plt
+    with plt.rc_context(rc):
+        return plt.gca()
+
+
+def _get_standard_kind(kind):
+    return {'density': 'kde'}.get(kind, kind)
+
+
+if LooseVersion(pd.__version__) < LooseVersion('0.25'):
+    from pandas.plotting._core import _all_kinds, BarPlot, BoxPlot, HistPlot, MPLPlot
+else:
+    from pandas.plotting._core import PlotAccessor
+    from pandas.plotting._matplotlib import BarPlot, BoxPlot, HistPlot
+    from pandas.plotting._matplotlib.core import MPLPlot
+    _all_kinds = PlotAccessor._all_kinds
+
+
 class KoalasBarPlot(BarPlot):
     max_rows = 1000
 
@@ -547,7 +564,7 @@ def _plot(data, x=None, y=None, subplots=False,
     return plot_obj.result
 
 
-class KoalasSeriesPlotMethods(BasePlotMethods):
+class KoalasSeriesPlotMethods(PandasObject):
     """
     Series plotting accessor and method.
 
@@ -556,6 +573,9 @@ class KoalasSeriesPlotMethods(BasePlotMethods):
     ``s.plot(kind='hist')`` is equivalent to ``s.plot.hist()``
     """
 
+    def __init__(self, data):
+        self.data = data
+
     def __call__(self, kind='line', ax=None,
                  figsize=None, use_index=True, title=None, grid=None,
                  legend=False, style=None, logx=False, logy=False,
@@ -564,11 +584,7 @@ def __call__(self, kind='line', ax=None,
                  rot=None, fontsize=None, colormap=None, table=False,
                  yerr=None, xerr=None,
                  label=None, secondary_y=False, **kwds):
-        if LooseVersion(pd.__version__) < LooseVersion('0.24'):
-            data = self._data
-        else:
-            data = self._parent
-        return plot_series(data, kind=kind, ax=ax, figsize=figsize,
+        return plot_series(self.data, kind=kind, ax=ax, figsize=figsize,
                            use_index=use_index, title=title, grid=grid,
                            legend=legend, style=style, logx=logx, logy=logy,
                            loglog=loglog, xticks=xticks, yticks=yticks,
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@
     },
     python_requires='>=3.5',
     install_requires=[
-        'pandas>=0.23,<0.25',
+        'pandas>=0.23',
         'pyarrow>=0.10',
         'numpy>=1.14',
         'matplotlib>=3.0.0',


Test patch: