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.

import pandas as pd

data = pd.Series([[1.2, -0.5, 0.3, 2.1, -2.2, 1.7, 0.0, -1.1, 2.5, -2.8]])
custom_bins = [-3, -2, -1, 0, 1, 2, 3]
data.hist(bins=custom_bins)
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.show()
Copy

Output

The SMA adds the EWI PNDSPY1008 to the output code to indicate that in one scenario it isn’t supported in Snowpark pandas.

from snowflake.snowpark.modin import plugin
import modin.pandas as pd

data = pd.Series([[1.2, -0.5, 0.3, 2.1, -2.2, 1.7, 0.0, -1.1, 2.5, -2.8]])
custom_bins = [-3, -2, -1, 0, 1, 2, 3]
#EWI: PNDSPY1008 => pandas.core.series.Series.hist has a partial mapping, Snowpark pandas doesn't yet support the `bins` parameter with types other than `int`.
data.hist(bins=custom_bins)
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.show()
Copy