class_docstr: The plotting method: `df.hvplot(...)` creates a plot similarly to the familiar Pandas
  `df.plot` method.
  
  For more detailed options use a specific plotting method, e.g. `df.hvplot.line`.
  
  Reference: https://hvplot.holoviz.org/reference/index.html
  
  Parameters
  ----------
  x : string, optional
      Field name(s) to draw x-positions from. If not specified, the index is
      used.
  y : string or list, optional
      Field name(s) to draw y-positions from. If not specified, all numerical
      fields are used.
  kind : string, optional
      The kind of plot to generate, e.g. 'area', 'bar', 'line', 'scatter' etc. To see the
      available plots run `print(df.hvplot.__all__)`.
  **kwds : optional
      Additional keywords arguments are documented in `hvplot.help('scatter')` or similar
      depending on the kind of plot.
  
  Returns
  -------
  A Holoviews object. You can `print` the object to study its composition and run
  
  .. code-block::
  
      import holoviews as hv
      hv.help(the_holoviews_object)
  
  to learn more about its parameters and options.
  
  Examples
  --------
  
  .. code-block::
  
      import pandas as pd
      import hvplot.pandas
  
      df = pd.DataFrame(
          {
              "actual": [100, 150, 125, 140, 145, 135, 123],
              "forecast": [90, 160, 125, 150, 141, 141, 120],
              "numerical": [1.1, 1.9, 3.2, 3.8, 4.3, 5.0, 5.5],
              "date": pd.date_range("2022-01-03", "2022-01-09"),
              "string": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
          },
      )
      line = df.hvplot.line(
          x="numerical",
          y=["actual", "forecast"],
          ylabel="value",
          legend="bottom",
          height=500,
          color=["steelblue", "teal"],
          alpha=0.7,
          line_width=5,
      )
      line
  
  You can can add *markers* to a `line` plot by overlaying with a `scatter` plot.
  
  .. code-block::
  
      markers = df.hvplot.scatter(
          x="numerical", y=["actual", "forecast"], color=["#f16a6f", "#1e85f7"], size=50
      )
      line * markers
  
  Please note that you can pass widgets or reactive functions as arguments instead of
  literal values, c.f. https://hvplot.holoviz.org/user_guide/Widgets.html.
class_docstr_tok: ["The","plotting","method",":","`","df.hvplot","(","...",")","`","creates","a","plot","similarly","to","the","familiar","Pandas","`","df.plot","`","method",".","For","more","detailed","options","use","a","specific","plotting","method",",","e.g",".","`","df.hvplot.line","`",".","Reference",":","https",":","\/\/hvplot.holoviz.org\/reference\/index.html","Parameters","--","--","--","--","--","x",":","string",",","optional","Field","name","(","s",")","to","draw","x-positions","from",".","If","not","specified",",","the","index","is","used",".","y",":","string","or","list",",","optional","Field","name","(","s",")","to","draw","y-positions","from",".","If","not","specified",",","all","numerical","fields","are","used",".","kind",":","string",",","optional","The","kind","of","plot","to","generate",",","e.g",".","'area","'",",","'bar","'",",","'line","'",",","'scatter","'","etc",".","To","see","the","available","plots","run","`","print","(","df.hvplot.__all__",")","`",".","*","*","kwds",":","optional","Additional","keywords","arguments","are","documented","in","`","hvplot.help","(","'scatter","'",")","`","or","similar","depending","on","the","kind","of","plot",".","Returns","--","--","--","-","A","Holoviews","object",".","You","can","`","print","`","the","object","to","study","its","composition","and","run","..","code-block",":",":","import","holoviews","as","hv","hv.help","(","the_holoviews_object",")","to","learn","more","about","its","parameters","and","options",".","Examples","--","--","--","--","..","code-block",":",":","import","pandas","as","pd","import","hvplot.pandas","df","=","pd.DataFrame","(","{","``","actual","''",":","[","100",",","150",",","125",",","140",",","145",",","135",",","123","]",",","``","forecast","''",":","[","90",",","160",",","125",",","150",",","141",",","141",",","120","]",",","``","numerical","''",":","[","1.1",",","1.9",",","3.2",",","3.8",",","4.3",",","5.0",",","5.5","]",",","``","date","''",":","pd.date_range","(","``","2022-01-03","''",",","``","2022-01-09","''",")",",","``","string","''",":","[","``","Mon","''",",","``","Tue","''",",","``","Wed","''",",","``","Thu","''",",","``","Fri","''",",","``","Sat","''",",","``","Sun","''","]",",","}",",",")","line","=","df.hvplot.line","(","x=","''","numerical","''",",","y=","[","``","actual","''",",","``","forecast","''","]",",","ylabel=","''","value","''",",","legend=","''","bottom","''",",","height=500",",","color=","[","``","steelblue","''",",","``","teal","''","]",",","alpha=0.7",",","line_width=5",",",")","line","You","can","can","add","*","markers","*","to","a","`","line","`","plot","by","overlaying","with","a","`","scatter","`","plot",".","..","code-block",":",":","markers","=","df.hvplot.scatter","(","x=","''","numerical","''",",","y=","[","``","actual","''",",","``","forecast","''","]",",","color=","[","``","#","f16a6f","''",",","``","#","1e85f7","''","]",",","size=50",")","line","*","markers","Please","note","that","you","can","pass","widgets","or","reactive","functions","as","arguments","instead","of","literal","values",",","c.f",".","https",":","\/\/hvplot.holoviz.org\/user_guide\/Widgets.html","."]
docstr: The Kernel density estimate (`density`) plot shows the distribution and spread of the data.
  
  The `kde` and `density` plots are the same.
  
  Reference: https://hvplot.holoviz.org/reference/pandas/kde.html
  
  Parameters
  ----------
  y : string or sequence
      Field(s) in the data to compute distribution from. If not specified all numerical fields
      are used.
  by : string or sequence
      Field(s) in the data to group by.
  bandwidth : float, optional
      The bandwidth of the kernel for the density estimate. Default is None.
  cut :
      Draw the estimate to cut * bw from the extreme data points.
  n_samples : int, optional
      Number of samples to compute the KDE over. Default is 100.
  filled :
      Whether the bivariate contours should be filled. Default is True.
  kwds : optional
      Additional keywords arguments are documented in `hvplot.help('density')`.
  
  Returns
  -------
  A Holoviews object. You can `print` the object to study its composition and run
  
  .. code-block::
  
      import holoviews as hv
      hv.help(the_holoviews_object)
  
  to learn more about its parameters and options.
  
  Examples
  --------
  
  Lets display a 'density' plot from *wide* data
  
  .. code-block::
  
      import hvplot.pandas
      import numpy as np
      import pandas as pd
  
      df = pd.DataFrame({
          'x': [1, 2, 2.5, 3, 3.5, 4, 5],
          'y': [4, 4, 4.5, 5, 5.5, 6, 6],
      })
      df.hvplot.density(color=["orange", "green"])
  
  Lets display a 'density' plot from *long* data using the 'by' attribute
  
  .. code-block::
  
      import hvplot.pandas # noqa
      import pandas as pd
      import numpy as np
      df = pd.DataFrame({
          'category': list('xxxxxxxyyyyyyy'),
          'value': [1, 2, 2.5, 3, 3.5, 4, 5, 4, 4, 4.5, 5, 5.5, 6, 6],
      })
      df.hvplot.density(by='category', filled=False)
  
  References
  ----------
  
  - HoloViews: https://holoviews.org/reference/elements/bokeh/Distribution.html
  - Pandas: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.kde.html
  - Plotly: https://plotly.com/python/distplot/
  - Seaborn: https://seaborn.pydata.org/generated/seaborn.kdeplot.html
  - Wiki: https://en.wikipedia.org/wiki/Kernel_density_estimation
docstr_tok: ["The","Kernel","density","estimate","(","`","density","`",")","plot","shows","the","distribution","and","spread","of","the","data",".","The","`","kde","`","and","`","density","`","plots","are","the","same",".","Reference",":","https",":","\/\/hvplot.holoviz.org\/reference\/pandas\/kde.html","Parameters","--","--","--","--","--","y",":","string","or","sequence","Field","(","s",")","in","the","data","to","compute","distribution","from",".","If","not","specified","all","numerical","fields","are","used",".","by",":","string","or","sequence","Field","(","s",")","in","the","data","to","group","by",".","bandwidth",":","float",",","optional","The","bandwidth","of","the","kernel","for","the","density","estimate",".","Default","is","None",".","cut",":","Draw","the","estimate","to","cut","*","bw","from","the","extreme","data","points",".","n_samples",":","int",",","optional","Number","of","samples","to","compute","the","KDE","over",".","Default","is","100.","filled",":","Whether","the","bivariate","contours","should","be","filled",".","Default","is","True",".","kwds",":","optional","Additional","keywords","arguments","are","documented","in","`","hvplot.help","(","'density","'",")","`",".","Returns","--","--","--","-","A","Holoviews","object",".","You","can","`","print","`","the","object","to","study","its","composition","and","run","..","code-block",":",":","import","holoviews","as","hv","hv.help","(","the_holoviews_object",")","to","learn","more","about","its","parameters","and","options",".","Examples","--","--","--","--","Lets","display","a","'density","'","plot","from","*","wide","*","data","..","code-block",":",":","import","hvplot.pandas","import","numpy","as","np","import","pandas","as","pd","df","=","pd.DataFrame","(","{","'","x","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5","]",",","'","y","'",":","[","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","}",")","df.hvplot.density","(","color=","[","``","orange","''",",","``","green","''","]",")","Lets","display","a","'density","'","plot","from","*","long","*","data","using","the","'by","'","attribute","..","code-block",":",":","import","hvplot.pandas","#","noqa","import","pandas","as","pd","import","numpy","as","np","df","=","pd.DataFrame","(","{","'category","'",":","list","(","'xxxxxxxyyyyyyy","'",")",",","'value","'",":","[","1",",","2",",","2.5",",","3",",","3.5",",","4",",","5",",","4",",","4",",","4.5",",","5",",","5.5",",","6",",","6","]",",","}",")","df.hvplot.density","(","by='category","'",",","filled=False",")","References","--","--","--","--","--","-","HoloViews",":","https",":","\/\/holoviews.org\/reference\/elements\/bokeh\/Distribution.html","-","Pandas",":","https",":","\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.DataFrame.plot.kde.html","-","Plotly",":","https",":","\/\/plotly.com\/python\/distplot\/","-","Seaborn",":","https",":","\/\/seaborn.pydata.org\/generated\/seaborn.kdeplot.html","-","Wiki",":","https",":","\/\/en.wikipedia.org\/wiki\/Kernel_density_estimation"]
code: def density(self, y=None, by=None, **kwds):
      """
      The Kernel density estimate (`density`) plot shows the distribution and spread of the data.
  
      The `kde` and `density` plots are the same.
  
      Reference: https://hvplot.holoviz.org/reference/pandas/kde.html
  
      Parameters
      ----------
      y : string or sequence
          Field(s) in the data to compute distribution from. If not specified all numerical fields
          are used.
      by : string or sequence
          Field(s) in the data to group by.
      bandwidth : float, optional
          The bandwidth of the kernel for the density estimate. Default is None.
      cut :
          Draw the estimate to cut * bw from the extreme data points.
      n_samples : int, optional
          Number of samples to compute the KDE over. Default is 100.
      filled :
          Whether the bivariate contours should be filled. Default is True.
      kwds : optional
          Additional keywords arguments are documented in `hvplot.help('density')`.
  
      Returns
      -------
      A Holoviews object. You can `print` the object to study its composition and run
  
      .. code-block::
  
          import holoviews as hv
          hv.help(the_holoviews_object)
  
      to learn more about its parameters and options.
  
      Examples
      --------
  
      Lets display a 'density' plot from *wide* data
  
      .. code-block::
  
          import hvplot.pandas
          import numpy as np
          import pandas as pd
  
          df = pd.DataFrame({
              'x': [1, 2, 2.5, 3, 3.5, 4, 5],
              'y': [4, 4, 4.5, 5, 5.5, 6, 6],
          })
          df.hvplot.density(color=["orange", "green"])
  
      Lets display a 'density' plot from *long* data using the 'by' attribute
  
      .. code-block::
  
          import hvplot.pandas # noqa
          import pandas as pd
          import numpy as np
          df = pd.DataFrame({
              'category': list('xxxxxxxyyyyyyy'),
              'value': [1, 2, 2.5, 3, 3.5, 4, 5, 4, 4, 4.5, 5, 5.5, 6, 6],
          })
          df.hvplot.density(by='category', filled=False)
  
      References
      ----------
  
      - HoloViews: https://holoviews.org/reference/elements/bokeh/Distribution.html
      - Pandas: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.kde.html
      - Plotly: https://plotly.com/python/distplot/
      - Seaborn: https://seaborn.pydata.org/generated/seaborn.kdeplot.html
      - Wiki: https://en.wikipedia.org/wiki/Kernel_density_estimation
      """
      return self(kind="kde", x=None, y=y, by=by, **kwds)
  
imports: import itertools
  from collections import defaultdict
  import param
  from ..converter import HoloViewsConverter
  from ..util import is_list_like, process_dynamic_args
label_desc: Use image node_id 16 for calling the hvPlotTabular obj's underlying member method code with example usage: obj.density(y, by) and returns: self