PNDSPY1008¶
Message pandas.core.series.Series.hist has a partial mapping, Snowpark pandas doesn’t yet support the bins parameter with types other than int.
Category Warning
Description¶
This issue appears when the SMA identifies a pandas.core.series.Series.hist usage.
Snowpark pandas doesn’t yet support the bins parameter with types other than int.
Scenario¶
An unsupported use of pandas.core.series.Series.hist.
Input¶
The following example shows an unsupported use of pandas.core.series.Series.hist.
Output¶
The SMA adds the EWI PNDSPY1008 to the output code to indicate that in one scenario it isn’t supported in Snowpark pandas.
Recommended fix¶
This requires a manual change using the numpy digitize function. To use digitize, import numpy and replace pd.Series with np.array. Then count the frequencies for each bin and create labels for the custom bins. Finally, use plt.bar to plot the histogram with custom labels.
Here is the previous output code with the fix: