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 a pie plot.
  
  A pie plot is a proportional representation of the numerical data in a
  column. This function wraps :meth:`plotly.express.pie` for the
  specified column.
  
  Parameters
  ----------
  y : int or label, optional
      Label or position of the column to plot.
      If not provided, ``subplots=True`` argument must be passed (matplotlib-only).
  **kwds
      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
  --------
  
  For Series:
  
  .. plotly::
  
      >>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97],
      ...                    'radius': [2439.7, 6051.8, 6378.1]},
      ...                   index=['Mercury', 'Venus', 'Earth'])
      >>> df.mass.plot.pie()  # doctest: +SKIP
  
  
  For DataFrame:
  
  .. plotly::
  
      >>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97],
      ...                    'radius': [2439.7, 6051.8, 6378.1]},
      ...                   index=['Mercury', 'Venus', 'Earth'])
      >>> df.plot.pie(y='mass')  # doctest: +SKIP
docstr_tok: ["Generate","a","pie","plot",".","A","pie","plot","is","a","proportional","representation","of","the","numerical","data","in","a","column",".","This","function","wraps",":","meth",":","`","plotly.express.pie","`","for","the","specified","column",".","Parameters","--","--","--","--","--","y",":","int","or","label",",","optional","Label","or","position","of","the","column","to","plot",".","If","not","provided",",","``","subplots=True","``","argument","must","be","passed","(","matplotlib-only",")",".","*","*","kwds","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","--","--","--","--","For","Series",":","..","plotly",":",":",">",">",">","df","=","ps.DataFrame","(","{","'mass","'",":","[","0.330",",","4.87",",","5.97","]",",","...","'radius","'",":","[","2439.7",",","6051.8",",","6378.1","]","}",",","...","index=","[","'Mercury","'",",","'Venus","'",",","'Earth","'","]",")",">",">",">","df.mass.plot.pie","(",")","#","doctest",":","+SKIP","For","DataFrame",":","..","plotly",":",":",">",">",">","df","=","ps.DataFrame","(","{","'mass","'",":","[","0.330",",","4.87",",","5.97","]",",","...","'radius","'",":","[","2439.7",",","6051.8",",","6378.1","]","}",",","...","index=","[","'Mercury","'",",","'Venus","'",",","'Earth","'","]",")",">",">",">","df.plot.pie","(","y='mass","'",")","#","doctest",":","+SKIP"]
code: def pie(self, **kwds):
      """
      Generate a pie plot.
  
      A pie plot is a proportional representation of the numerical data in a
      column. This function wraps :meth:`plotly.express.pie` for the
      specified column.
  
      Parameters
      ----------
      y : int or label, optional
          Label or position of the column to plot.
          If not provided, ``subplots=True`` argument must be passed (matplotlib-only).
      **kwds
          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
      --------
  
      For Series:
  
      .. plotly::
  
          >>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97],
          ...                    'radius': [2439.7, 6051.8, 6378.1]},
          ...                   index=['Mercury', 'Venus', 'Earth'])
          >>> df.mass.plot.pie()  # doctest: +SKIP
  
  
      For DataFrame:
  
      .. plotly::
  
          >>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97],
          ...                    'radius': [2439.7, 6051.8, 6378.1]},
          ...                   index=['Mercury', 'Venus', 'Earth'])
          >>> df.plot.pie(y='mass')  # doctest: +SKIP
      """
      from pyspark.pandas import DataFrame, Series
  
      if isinstance(self.data, Series):
          return self(kind="pie", **kwds)
      else:
          # pandas will raise an error if y is None and subplots if not True
          if (
              isinstance(self.data, DataFrame)
              and kwds.get("y", None) is None
              and not kwds.get("subplots", False)
          ):
              raise ValueError(
                  "pie requires either y column or 'subplots=True' (matplotlib-only)"
              )
          return self(kind="pie", **kwds)
  
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 12 for calling the PandasOnSparkPlotAccessor obj's underlying member method code with example usage: obj.pie() and returns: self, self