snowpark-python icon indicating copy to clipboard operation
snowpark-python copied to clipboard

SNOW-1065294: Null value in integer column raises exception when executing .to_pandas() in version ^1.12 for mock connections

Open shanefrieskh opened this issue 1 year ago • 1 comments

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

Python 3.11.2

  1. What are the Snowpark Python and Pandas versions in the environment?
pandas==2.1.4
snowflake-snowpark-python==1.12.1
  1. What did you do?
session = Session.builder.config('local_testing', True).create()
df = session.create_dataframe(
    data=[
        [1],
        [None],
    ],
    schema=["C1"]
)
print(df.to_pandas())

returns: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Similar to #1232 but in mock connection handling

  1. What did you expect to see?
    C1
0  1.0
1  NaN

shanefrieskh avatar Feb 22 '24 12:02 shanefrieskh

thanks @shanefrieskh for reaching out. we will take a look at this issue

sfc-gh-aling avatar Feb 23 '24 18:02 sfc-gh-aling

@shanefrieskh -- Can you re-try with v1.14.0? It should be fixed.

sfc-gh-jfreeberg avatar Apr 11 '24 22:04 sfc-gh-jfreeberg

@sfc-gh-jfreeberg confirmed it has been working since 1.14. Thank you for the quick fix

shanefrieskh avatar Apr 11 '24 22:04 shanefrieskh