Question: /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an
/Users/jonathansmith/anaconda3/lib/python3.7/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result. return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py:140: RuntimeWarning: Degrees of freedom <= 0 for slice keepdims=keepdims) /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars ret = ret.dtype.type(ret / rcount) /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/statsmodels/nonparametric/bandwidths.py:20: RuntimeWarning: invalid value encountered in minimum return np.minimum(np.std(X, axis=0, ddof=1), IQR) /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py:83:
RuntimeWarning: invalid value encountered in reduce return ufunc.reduce(obj, axis, dtype, out, **passkwargs) /Users/jonathansmith/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py:679: UserWarning: Passing a 2D dataset for a bivariate plot is deprecated in favor of kdeplot(x, y), and it will cause an error in future versions. Please update your code. warnings.warn(warn_msg, UserWarning) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ----> 1 sns.pairplot(df5,hue='FY20AUG') ~/anaconda3/lib/python3.7/site-packages/seaborn/axisgrid.py in pairplot(data, hue, hue_order, palette, vars, x_vars, y_vars, kind, diag_kind, markers, height, aspect, dropna, plot_kws, diag_kws, grid_kws, size) 2109 diag_kws.setdefault("shade", True) 2110 diag_kws["legend"] = False -> 2111 grid.map_diag(kdeplot, **diag_kws) 2112 2113 # Maybe plot on the off-diagonals ~/anaconda3/lib/python3.7/site-packages/seaborn/axisgrid.py in map_diag(self, func, **kwargs) 1397 color = fixed_color 1398 -> 1399 func(data_k, label=label_k, color=color, **kwargs) 1400 1401 self._clean_axis(ax) ~/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py in kdeplot(data, data2, shade, vertical, kernel, bw, gridsize, cut, clip, legend, cumulative, shade_lowest, cbar, cbar_ax, cbar_kws, ax, **kwargs) 685 ax = _bivariate_kdeplot(x, y, shade, shade_lowest, 686 kernel, bw, gridsize, cut, clip, legend, --> 687 cbar, cbar_ax, cbar_kws, ax, **kwargs) 688 else: 689 ax = _univariate_kdeplot(data, shade, vertical, kernel, bw, ~/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py in _bivariate_kdeplot(x, y, filled, fill_lowest, kernel, bw, gridsize, cut, clip, axlabel, cbar, cbar_ax, cbar_kws, ax, **kwargs) 391 # Calculate the KDE 392 if _has_statsmodels: --> 393 xx, yy, z = _statsmodels_bivariate_kde(x, y, bw, gridsize, cut, clip) 394 else: 395 xx, yy, z = _scipy_bivariate_kde(x, y, bw, gridsize, cut, clip) ~/anaconda3/lib/python3.7/site-packages/seaborn/distributions.py in _statsmodels_bivariate_kde(x, y, bw, gridsize, cut, clip) 461 y = y.values 462 --> 463 kde = smnp.KDEMultivariate([x, y], "cc", bw) 464 x_support = _kde_support(x, kde.bw[0], gridsize, cut, clip[0]) 465 y_support = _kde_support(y, kde.bw[1], gridsize, cut, clip[1]) ~/anaconda3/lib/python3.7/site-packages/statsmodels/nonparametric/kernel_density.py in __init__(self, data, var_type, bw, defaults) 109 self.nobs, self.k_vars = np.shape(self.data) 110 if self.nobs <= self.k_vars: --> 111 raise ValueError("The number of observations must be larger " \ 112 "than the number of variables.") 113 ValueError: The number of observations must be larger than the number of variables.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
