Skip to content

Commit

Permalink
fix pandas dependency issue (#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aalam authored Oct 30, 2024
1 parent fd86b5b commit 714e767
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/snowflake/snowpark/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4522,27 +4522,27 @@ def map(
for i, col_name in enumerate(output_column_names)
]

def wrap_result(result):
if vectorized:
if vectorized:

def wrap_result(result):
if isinstance(result, pandas.DataFrame) or isinstance(result, tuple):
return result
return (result,)

if isinstance(result, Row):
return tuple(result)
elif isinstance(result, tuple):
return result
else:
return (result,)

if vectorized:

class _MapFunc:
def process(self, pdf):
return wrap_result(func(pdf))

else:

def wrap_result(result):
if isinstance(result, Row):
return tuple(result)
elif isinstance(result, tuple):
return result
else:
return (result,)

class _MapFunc:
def process(self, *argv):
input_args_to_row = Row(*df_columns)
Expand Down

0 comments on commit 714e767

Please sign in to comment.