PNDSPY1012¶
Message pandas.core.frame.DataFrame.query has a partial mapping because there is an unsupported scenario in Snowpark pandas.
Category Warning
Description¶
This issue appears when the SMA detects the use of pandas.core.frame.DataFrame.query. This method is commonly used for filtering data in pandas DataFrames, but Snowpark pandas currently has limitations in supporting it. Specifically, it doesn’t support DataFrames that have a row MultiIndex, which can lead to compatibility issues during migration or execution.
Scenario¶
Using query() with a row MultiIndex.
Input¶
The following example shows how query() behaves with a row MultiIndex.
Output¶
The SMA adds the EWI PNDSPY1012 to the output code to indicate that it has a scenario not supported in Snowpark pandas.
Recommended fix¶
If the DataFrame contains a MultiIndex, validate the behavior of the query() method in Snowpark pandas. Ensure that the DataFrame structure is compatible with Snowpark pandas’ limitations, as MultiIndex rows aren’t supported. Consider restructuring the DataFrame to use a single-level index or alternative filtering methods.