Skip to content

Name the missing pandas extra when fetch_pandas fails - #3043

Open
Hashim1999164 wants to merge 1 commit into
snowflakedb:mainfrom
Hashim1999164:fix/pandas-extra-missing-pyarrow-message
Open

Hashim1999164 wants to merge 1 commit into
snowflakedb:mainfrom
Hashim1999164:fix/pandas-extra-missing-pyarrow-message

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Sep 27, 2026 •

Copy link
Copy Markdown

Summary

installed_pandas is only true when both pandas and pyarrow import successfully, but check_can_use_pandas always said pandas was missing. That made Snowpark to_pandas() failures blame pandas even when pandas was already installed and only pyarrow was absent (see snowflakedb/snowpark-python#4383).

This change imports the two packages separately, tracks which one failed, and puts that name in the error message.

Test plan

  • pytest test/integ/pandas_it/test_unit_options.py (covers pyarrow-only missing case and message text)
  • Confirm fetch_pandas_all with pandas installed and pyarrow missing names pyarrow in the error

installed_pandas requires both pandas and pyarrow, but the error always
blamed pandas. Report whichever package failed to import so users who
already have pandas know to install pyarrow.

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant