class_docstr: Series/Frames plotting accessor and method.
  
  Uses the backend specified by the
  option ``plotting.backend``. By default, plotly is used.
  
  Plotting methods can also be accessed by calling the accessor as a method
  with the ``kind`` argument:
  ``s.plot(kind='hist')`` is equivalent to ``s.plot.hist()``
docstr: Generate Kernel Density Estimate plot using Gaussian kernels.
  
  Parameters
  ----------
  bw_method : scalar
      The method used to calculate the estimator bandwidth.
      See KernelDensity in PySpark for more information.
  ind : NumPy array or integer, optional
      Evaluation points for the estimated PDF. If None (default),
      1000 equally spaced points are used. If `ind` is a NumPy array, the
      KDE is evaluated at the points passed. If `ind` is an integer,
      `ind` number of equally spaced points are used.
  **kwargs : optional
      Keyword arguments to pass on to :meth:`pandas-on-Spark.Series.plot`.
  
  Returns
  -------
  :class:`plotly.graph_objs.Figure`
      Return an custom object when ``backend!=plotly``.
      Return an ndarray when ``subplots=True`` (matplotlib-only).
  
  Examples
  --------
  A scalar bandwidth should be specified. Using a small bandwidth value can
  lead to over-fitting, while using a large bandwidth value may result
  in under-fitting:
  
  .. plotly::
  
      >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
      >>> s.plot.kde(bw_method=0.3)  # doctest: +SKIP
  
  .. plotly::
  
      >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
      >>> s.plot.kde(bw_method=3)  # doctest: +SKIP
  
  The `ind` parameter determines the evaluation points for the
  plot of the estimated KDF:
  
  .. plotly::
  
      >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
      >>> s.plot.kde(ind=[1, 2, 3, 4, 5], bw_method=0.3)  # doctest: +SKIP
  
  For DataFrame, it works in the same way as Series:
  
  .. plotly::
  
      >>> df = ps.DataFrame({
      ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
      ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
      ... })
      >>> df.plot.kde(bw_method=0.3)  # doctest: +SKIP
  
  .. plotly::
  
      >>> df = ps.DataFrame({
      ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
      ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
      ... })
      >>> df.plot.kde(bw_method=3)  # doctest: +SKIP
  
  .. plotly::
  
      >>> df = ps.DataFrame({
      ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
      ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
      ... })
      >>> df.plot.kde(ind=[1, 2, 3, 4, 5, 6], bw_method=0.3)  # doctest: +SKIP
docstr_tok: ["Generate","Kernel","Density","Estimate","plot","using","Gaussian","kernels",".","Parameters","--","--","--","--","--","bw_method",":","scalar","The","method","used","to","calculate","the","estimator","bandwidth",".","See","KernelDensity","in","PySpark","for","more","information",".","ind",":","NumPy","array","or","integer",",","optional","Evaluation","points","for","the","estimated","PDF",".","If","None","(","default",")",",","1000","equally","spaced","points","are","used",".","If","`","ind","`","is","a","NumPy","array",",","the","KDE","is","evaluated","at","the","points","passed",".","If","`","ind","`","is","an","integer",",","`","ind","`","number","of","equally","spaced","points","are","used",".","*","*","kwargs",":","optional","Keyword","arguments","to","pass","on","to",":","meth",":","`","pandas-on-Spark.Series.plot","`",".","Returns","--","--","--","-",":","class",":","`","plotly.graph_objs.Figure","`","Return","an","custom","object","when","``","backend","!","=plotly","``",".","Return","an","ndarray","when","``","subplots=True","``","(","matplotlib-only",")",".","Examples","--","--","--","--","A","scalar","bandwidth","should","be","specified",".","Using","a","small","bandwidth","value","can","lead","to","over-fitting",",","while","using","a","large","bandwidth","value","may","result","in","under-fitting",":","..","plotly",":",":",">",">",">","s","=","ps.Series","(","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",")",">",">",">","s.plot.kde","(","bw_method=0.3",")","#","doctest",":","+SKIP","..","plotly",":",":",">",">",">","s","=","ps.Series","(","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",")",">",">",">","s.plot.kde","(","bw_method=3",")","#","doctest",":","+SKIP","The","`","ind","`","parameter","determines","the","evaluation","points","for","the","plot","of","the","estimated","KDF",":","..","plotly",":",":",">",">",">","s","=","ps.Series","(","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",")",">",">",">","s.plot.kde","(","ind=","[","1",",","2",",","3",",","4",",","5","]",",","bw_method=0.3",")","#","doctest",":","+SKIP","For","DataFrame",",","it","works","in","the","same","way","as","Series",":","..","plotly",":",":",">",">",">","df","=","ps.DataFrame","(","{","...","'","x","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",",","...","'","y","'",":","[","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","...","}",")",">",">",">","df.plot.kde","(","bw_method=0.3",")","#","doctest",":","+SKIP","..","plotly",":",":",">",">",">","df","=","ps.DataFrame","(","{","...","'","x","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",",","...","'","y","'",":","[","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","...","}",")",">",">",">","df.plot.kde","(","bw_method=3",")","#","doctest",":","+SKIP","..","plotly",":",":",">",">",">","df","=","ps.DataFrame","(","{","...","'","x","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",",","...","'","y","'",":","[","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","...","}",")",">",">",">","df.plot.kde","(","ind=","[","1",",","2",",","3",",","4",",","5",",","6","]",",","bw_method=0.3",")","#","doctest",":","+SKIP"]
code: def kde(self, bw_method=None, ind=None, **kwargs):
      """
      Generate Kernel Density Estimate plot using Gaussian kernels.
  
      Parameters
      ----------
      bw_method : scalar
          The method used to calculate the estimator bandwidth.
          See KernelDensity in PySpark for more information.
      ind : NumPy array or integer, optional
          Evaluation points for the estimated PDF. If None (default),
          1000 equally spaced points are used. If `ind` is a NumPy array, the
          KDE is evaluated at the points passed. If `ind` is an integer,
          `ind` number of equally spaced points are used.
      **kwargs : optional
          Keyword arguments to pass on to :meth:`pandas-on-Spark.Series.plot`.
  
      Returns
      -------
      :class:`plotly.graph_objs.Figure`
          Return an custom object when ``backend!=plotly``.
          Return an ndarray when ``subplots=True`` (matplotlib-only).
  
      Examples
      --------
      A scalar bandwidth should be specified. Using a small bandwidth value can
      lead to over-fitting, while using a large bandwidth value may result
      in under-fitting:
  
      .. plotly::
  
          >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
          >>> s.plot.kde(bw_method=0.3)  # doctest: +SKIP
  
      .. plotly::
  
          >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
          >>> s.plot.kde(bw_method=3)  # doctest: +SKIP
  
      The `ind` parameter determines the evaluation points for the
      plot of the estimated KDF:
  
      .. plotly::
  
          >>> s = ps.Series([1, 2, 2.5, 3, 3.5, 4, 5])
          >>> s.plot.kde(ind=[1, 2, 3, 4, 5], bw_method=0.3)  # doctest: +SKIP
  
      For DataFrame, it works in the same way as Series:
  
      .. plotly::
  
          >>> df = ps.DataFrame({
          ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
          ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
          ... })
          >>> df.plot.kde(bw_method=0.3)  # doctest: +SKIP
  
      .. plotly::
  
          >>> df = ps.DataFrame({
          ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
          ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
          ... })
          >>> df.plot.kde(bw_method=3)  # doctest: +SKIP
  
      .. plotly::
  
          >>> df = ps.DataFrame({
          ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
          ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
          ... })
          >>> df.plot.kde(ind=[1, 2, 3, 4, 5, 6], bw_method=0.3)  # doctest: +SKIP
      """
      return self(kind="kde", bw_method=bw_method, ind=ind, **kwargs)
  
imports: import importlib
  import pandas
  import numpy
  from pandas.core.base import PandasObject
  from pandas.core.dtypes.inference import is_integer
  from pyspark.ml.feature import Bucketizer
  from pyspark.mllib.stat import KernelDensity
  from pyspark.sql import functions
  from pyspark.pandas.missing import unsupported_function
  from pyspark.pandas.config import get_option
  from pyspark.pandas.utils import name_like_string
label_desc: Use image node_id 10 for calling the PandasOnSparkPlotAccessor obj's underlying member method code with example usage: obj.kde(bw_method, ind) and returns: self