class_docstr: Make plots of Series or DataFrame.
  
  Uses the backend specified by the
  option ``plotting.backend``. By default, matplotlib is used.
  
  Parameters
  ----------
  data : Series or DataFrame
      The object for which the method is called.
  x : label or position, default None
      Only used if data is a DataFrame.
  y : label, position or list of label, positions, default None
      Allows plotting of one column versus another. Only used if data is a
      DataFrame.
  kind : str
      The kind of plot to produce:
  
      - 'line' : line plot (default)
      - 'bar' : vertical bar plot
      - 'barh' : horizontal bar plot
      - 'hist' : histogram
      - 'box' : boxplot
      - 'kde' : Kernel Density Estimation plot
      - 'density' : same as 'kde'
      - 'area' : area plot
      - 'pie' : pie plot
      - 'scatter' : scatter plot (DataFrame only)
      - 'hexbin' : hexbin plot (DataFrame only)
  ax : matplotlib axes object, default None
      An axes of the current figure.
  subplots : bool or sequence of iterables, default False
      Whether to group columns into subplots:
  
      - ``False`` : No subplots will be used
      - ``True`` : Make separate subplots for each column.
      - sequence of iterables of column labels: Create a subplot for each
        group of columns. For example `[('a', 'c'), ('b', 'd')]` will
        create 2 subplots: one with columns 'a' and 'c', and one
        with columns 'b' and 'd'. Remaining columns that aren't specified
        will be plotted in additional subplots (one per column).
  
        .. versionadded:: 1.5.0
  
  sharex : bool, default True if ax is None else False
      In case ``subplots=True``, share x axis and set some x axis labels
      to invisible; defaults to True if ax is None otherwise False if
      an ax is passed in; Be aware, that passing in both an ax and
      ``sharex=True`` will alter all x axis labels for all axis in a figure.
  sharey : bool, default False
      In case ``subplots=True``, share y axis and set some y axis labels to invisible.
  layout : tuple, optional
      (rows, columns) for the layout of subplots.
  figsize : a tuple (width, height) in inches
      Size of a figure object.
  use_index : bool, default True
      Use index as ticks for x axis.
  title : str or list
      Title to use for the plot. If a string is passed, print the string
      at the top of the figure. If a list is passed and `subplots` is
      True, print each item in the list above the corresponding subplot.
  grid : bool, default None (matlab style default)
      Axis grid lines.
  legend : bool or {'reverse'}
      Place legend on axis subplots.
  style : list or dict
      The matplotlib line style per column.
  logx : bool or 'sym', default False
      Use log scaling or symlog scaling on x axis.
  
  logy : bool or 'sym' default False
      Use log scaling or symlog scaling on y axis.
  
  loglog : bool or 'sym', default False
      Use log scaling or symlog scaling on both x and y axes.
  
  xticks : sequence
      Values to use for the xticks.
  yticks : sequence
      Values to use for the yticks.
  xlim : 2-tuple/list
      Set the x limits of the current axes.
  ylim : 2-tuple/list
      Set the y limits of the current axes.
  xlabel : label, optional
      Name to use for the xlabel on x-axis. Default uses index name as xlabel, or the
      x-column name for planar plots.
  
      .. versionadded:: 1.1.0
  
      .. versionchanged:: 1.2.0
  
         Now applicable to planar plots (`scatter`, `hexbin`).
  
      .. versionchanged:: 2.0.0
  
          Now applicable to histograms.
  
  ylabel : label, optional
      Name to use for the ylabel on y-axis. Default will show no ylabel, or the
      y-column name for planar plots.
  
      .. versionadded:: 1.1.0
  
      .. versionchanged:: 1.2.0
  
         Now applicable to planar plots (`scatter`, `hexbin`).
  
      .. versionchanged:: 2.0.0
  
          Now applicable to histograms.
  
  rot : float, default None
      Rotation for ticks (xticks for vertical, yticks for horizontal
      plots).
  fontsize : float, default None
      Font size for xticks and yticks.
  colormap : str or matplotlib colormap object, default None
      Colormap to select colors from. If string, load colormap with that
      name from matplotlib.
  colorbar : bool, optional
      If True, plot colorbar (only relevant for 'scatter' and 'hexbin'
      plots).
  position : float
      Specify relative alignments for bar plot layout.
      From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5
      (center).
  table : bool, Series or DataFrame, default False
      If True, draw a table using the data in the DataFrame and the data
      will be transposed to meet matplotlib's default layout.
      If a Series or DataFrame is passed, use passed data to draw a
      table.
  yerr : DataFrame, Series, array-like, dict and str
      See :ref:`Plotting with Error Bars <visualization.errorbars>` for
      detail.
  xerr : DataFrame, Series, array-like, dict and str
      Equivalent to yerr.
  stacked : bool, default False in line and bar plots, and True in area plot
      If True, create stacked plot.
  secondary_y : bool or sequence, default False
      Whether to plot on the secondary y-axis if a list/tuple, which
      columns to plot on secondary y-axis.
  mark_right : bool, default True
      When using a secondary_y axis, automatically mark the column
      labels with "(right)" in the legend.
  include_bool : bool, default is False
      If True, boolean values can be plotted.
  backend : str, default None
      Backend to use instead of the backend specified in the option
      ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to
      specify the ``plotting.backend`` for the whole session, set
      ``pd.options.plotting.backend``.
  **kwargs
      Options to pass to matplotlib plotting method.
  
  Returns
  -------
  :class:`matplotlib.axes.Axes` or numpy.ndarray of them
      If the backend is not the default matplotlib one, the return value
      will be the object returned by the backend.
  
  Notes
  -----
  - See matplotlib documentation online for more on this subject
  - If `kind` = 'bar' or 'barh', you can specify relative alignments
    for bar plot layout by `position` keyword.
    From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5
    (center)
docstr: Generate Kernel Density Estimate plot using Gaussian kernels.
  
  In statistics, `kernel density estimation`_ (KDE) is a non-parametric
  way to estimate the probability density function (PDF) of a random
  variable. This function uses Gaussian kernels and includes automatic
  bandwidth determination.
  
  .. _kernel density estimation:
      https://en.wikipedia.org/wiki/Kernel_density_estimation
  
  Parameters
  ----------
  bw_method : str, scalar or callable, optional
      The method used to calculate the estimator bandwidth. This can be
      'scott', 'silverman', a scalar constant or a callable.
      If None (default), 'scott' is used.
      See :class:`scipy.stats.gaussian_kde` for more information.
  ind : NumPy array or int, 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
      Additional keyword arguments are documented in
      :meth:`DataFrame.plot`.
  
  Returns
  -------
  matplotlib.axes.Axes or numpy.ndarray of them
  
  See Also
  --------
  scipy.stats.gaussian_kde : Representation of a kernel-density
      estimate using Gaussian kernels. This is the function used
      internally to estimate the PDF.
  
  Examples
  --------
  Given a Series of points randomly sampled from an unknown
  distribution, estimate its PDF using KDE with automatic
  bandwidth determination and plot the results, evaluating them at
  1000 equally spaced points (default):
  
  .. plot::
      :context: close-figs
  
      >>> s = pd.Series([1, 2, 2.5, 3, 3.5, 4, 5])
      >>> ax = s.plot.kde()
  
  A scalar bandwidth can be specified. Using a small bandwidth value can
  lead to over-fitting, while using a large bandwidth value may result
  in under-fitting:
  
  .. plot::
      :context: close-figs
  
      >>> ax = s.plot.kde(bw_method=0.3)
  
  .. plot::
      :context: close-figs
  
      >>> ax = s.plot.kde(bw_method=3)
  
  Finally, the `ind` parameter determines the evaluation points for the
  plot of the estimated PDF:
  
  .. plot::
      :context: close-figs
  
      >>> ax = s.plot.kde(ind=[1, 2, 3, 4, 5])
  
  For DataFrame, it works in the same way:
  
  .. plot::
      :context: close-figs
  
      >>> df = pd.DataFrame({
      ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
      ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
      ... })
      >>> ax = df.plot.kde()
  
  A scalar bandwidth can be specified. Using a small bandwidth value can
  lead to over-fitting, while using a large bandwidth value may result
  in under-fitting:
  
  .. plot::
      :context: close-figs
  
      >>> ax = df.plot.kde(bw_method=0.3)
  
  .. plot::
      :context: close-figs
  
      >>> ax = df.plot.kde(bw_method=3)
  
  Finally, the `ind` parameter determines the evaluation points for the
  plot of the estimated PDF:
  
  .. plot::
      :context: close-figs
  
      >>> ax = df.plot.kde(ind=[1, 2, 3, 4, 5, 6])
docstr_tok: ["Generate","Kernel","Density","Estimate","plot","using","Gaussian","kernels",".","In","statistics",",","`","kernel","density","estimation","`","_","(","KDE",")","is","a","non-parametric","way","to","estimate","the","probability","density","function","(","PDF",")","of","a","random","variable",".","This","function","uses","Gaussian","kernels","and","includes","automatic","bandwidth","determination",".","..","_kernel","density","estimation",":","https",":","\/\/en.wikipedia.org\/wiki\/Kernel_density_estimation","Parameters","--","--","--","--","--","bw_method",":","str",",","scalar","or","callable",",","optional","The","method","used","to","calculate","the","estimator","bandwidth",".","This","can","be","'scott","'",",","'silverman","'",",","a","scalar","constant","or","a","callable",".","If","None","(","default",")",",","'scott","'","is","used",".","See",":","class",":","`","scipy.stats.gaussian_kde","`","for","more","information",".","ind",":","NumPy","array","or","int",",","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","Additional","keyword","arguments","are","documented","in",":","meth",":","`","DataFrame.plot","`",".","Returns","--","--","--","-","matplotlib.axes.Axes","or","numpy.ndarray","of","them","See","Also","--","--","--","--","scipy.stats.gaussian_kde",":","Representation","of","a","kernel-density","estimate","using","Gaussian","kernels",".","This","is","the","function","used","internally","to","estimate","the","PDF",".","Examples","--","--","--","--","Given","a","Series","of","points","randomly","sampled","from","an","unknown","distribution",",","estimate","its","PDF","using","KDE","with","automatic","bandwidth","determination","and","plot","the","results",",","evaluating","them","at","1000","equally","spaced","points","(","default",")",":","..","plot",":",":",":","context",":","close-figs",">",">",">","s","=","pd.Series","(","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",")",">",">",">","ax","=","s.plot.kde","(",")","A","scalar","bandwidth","can","be","specified",".","Using","a","small","bandwidth","value","can","lead","to","over-fitting",",","while","using","a","large","bandwidth","value","may","result","in","under-fitting",":","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","s.plot.kde","(","bw_method=0.3",")","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","s.plot.kde","(","bw_method=3",")","Finally",",","the","`","ind","`","parameter","determines","the","evaluation","points","for","the","plot","of","the","estimated","PDF",":","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","s.plot.kde","(","ind=","[","1",",","2",",","3",",","4",",","5","]",")","For","DataFrame",",","it","works","in","the","same","way",":","..","plot",":",":",":","context",":","close-figs",">",">",">","df","=","pd.DataFrame","(","{","...","'","x","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",",","...","'","y","'",":","[","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","...","}",")",">",">",">","ax","=","df.plot.kde","(",")","A","scalar","bandwidth","can","be","specified",".","Using","a","small","bandwidth","value","can","lead","to","over-fitting",",","while","using","a","large","bandwidth","value","may","result","in","under-fitting",":","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","df.plot.kde","(","bw_method=0.3",")","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","df.plot.kde","(","bw_method=3",")","Finally",",","the","`","ind","`","parameter","determines","the","evaluation","points","for","the","plot","of","the","estimated","PDF",":","..","plot",":",":",":","context",":","close-figs",">",">",">","ax","=","df.plot.kde","(","ind=","[","1",",","2",",","3",",","4",",","5",",","6","]",")"]
code: def kde(self, bw_method=None, ind=None, **kwargs) -> PlotAccessor:
      """
      Generate Kernel Density Estimate plot using Gaussian kernels.
  
      In statistics, `kernel density estimation`_ (KDE) is a non-parametric
      way to estimate the probability density function (PDF) of a random
      variable. This function uses Gaussian kernels and includes automatic
      bandwidth determination.
  
      .. _kernel density estimation:
          https://en.wikipedia.org/wiki/Kernel_density_estimation
  
      Parameters
      ----------
      bw_method : str, scalar or callable, optional
          The method used to calculate the estimator bandwidth. This can be
          'scott', 'silverman', a scalar constant or a callable.
          If None (default), 'scott' is used.
          See :class:`scipy.stats.gaussian_kde` for more information.
      ind : NumPy array or int, 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
          Additional keyword arguments are documented in
          :meth:`DataFrame.plot`.
  
      Returns
      -------
      matplotlib.axes.Axes or numpy.ndarray of them
  
      See Also
      --------
      scipy.stats.gaussian_kde : Representation of a kernel-density
          estimate using Gaussian kernels. This is the function used
          internally to estimate the PDF.
  
      Examples
      --------
      Given a Series of points randomly sampled from an unknown
      distribution, estimate its PDF using KDE with automatic
      bandwidth determination and plot the results, evaluating them at
      1000 equally spaced points (default):
  
      .. plot::
          :context: close-figs
  
          >>> s = pd.Series([1, 2, 2.5, 3, 3.5, 4, 5])
          >>> ax = s.plot.kde()
  
      A scalar bandwidth can be specified. Using a small bandwidth value can
      lead to over-fitting, while using a large bandwidth value may result
      in under-fitting:
  
      .. plot::
          :context: close-figs
  
          >>> ax = s.plot.kde(bw_method=0.3)
  
      .. plot::
          :context: close-figs
  
          >>> ax = s.plot.kde(bw_method=3)
  
      Finally, the `ind` parameter determines the evaluation points for the
      plot of the estimated PDF:
  
      .. plot::
          :context: close-figs
  
          >>> ax = s.plot.kde(ind=[1, 2, 3, 4, 5])
  
      For DataFrame, it works in the same way:
  
      .. plot::
          :context: close-figs
  
          >>> df = pd.DataFrame({
          ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
          ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
          ... })
          >>> ax = df.plot.kde()
  
      A scalar bandwidth can be specified. Using a small bandwidth value can
      lead to over-fitting, while using a large bandwidth value may result
      in under-fitting:
  
      .. plot::
          :context: close-figs
  
          >>> ax = df.plot.kde(bw_method=0.3)
  
      .. plot::
          :context: close-figs
  
          >>> ax = df.plot.kde(bw_method=3)
  
      Finally, the `ind` parameter determines the evaluation points for the
      plot of the estimated PDF:
  
      .. plot::
          :context: close-figs
  
          >>> ax = df.plot.kde(ind=[1, 2, 3, 4, 5, 6])
      """
      return self(kind="kde", bw_method=bw_method, ind=ind, **kwargs)
  
imports: from __future__ import annotations
  import importlib
  import types
  from typing import TYPE_CHECKING, Sequence
  from pandas._config import get_option
  from pandas._typing import IndexLabel
  from pandas.util._decorators import Appender, Substitution
  from pandas.core.dtypes.common import is_integer, is_list_like
  from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries
  from pandas.core.base import PandasObject
label_desc: Use image node_id 9 for calling the PlotAccessor obj's underlying member method code with example usage: obj.kde(bw_method, ind) and returns: self