def kde(<EOL>self,<EOL>x=None,<EOL>y=None,<EOL>bw_method=None,<EOL>alpha=None,<EOL>width=<NUM_LIT>,<EOL>height=<NUM_LIT>,<EOL>ax=None,<EOL>**kwds<EOL>):
from scipy.stats import gaussian_kde as kde<EOL>if x is not None:  <EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>if y is not None:<EOL><INDENT>df = self._data[y].to_frame()<EOL><DEDENT>else:<EOL><INDENT>df = self._data<EOL><DEDENT>tmin, tmax = df.min().min(), df.max().max()<EOL>trange = tmax - tmin<EOL>t = np.linspace(tmin - <NUM_LIT:0.5> * trange, tmax + <NUM_LIT:0.5> * trange, <NUM_LIT:1000>)<EOL>kde_df = pd.DataFrame(<EOL>{col: kde(df[col], bw_method=bw_method).evaluate(t) for col in df}, index=t<EOL>)<EOL>kde_df.index.name = "<STR_LIT:U+0020>"<EOL>f = FramePlotMethods(kde_df)<EOL>return f.line(<EOL>value_name="<STR_LIT>", alpha=alpha, width=width, height=height, ax=ax, **kwds<EOL>)<EOL>
Kernel Density Estimate plot for DataFrame data

        >>> dataframe.vgplot.kde()  # doctest: +SKIP

        Parameters
        ----------
        x : string, optional
            the column to use as the x-axis variable. If not specified, the
            index will be used.
        y : string, optional
            the column to use as the y-axis variable. If not specified, all
            columns (except x if specified) will be used.
        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.
            See `scipy.stats.gaussian_kde` for more details.
        alpha : float, optional
            transparency level, 0 <= alpha <= 1
        width : int, optional
            the width of the plot in pixels
        height : int, optional
            the height of the plot in pixels
        ax: altair.Chart, optional
            chart to be overlayed with this vis (convinience method for `chart1 + chart2`)

        Returns
        -------
        chart : alt.Chart
            altair chart representation