You are viewing documentation about an older version (1.3.0). View latest version

snowflake.snowpark.DataFrame.toPandas¶

DataFrame.toPandas(*, statement_params: Dict[str, str] | None = None, block: bool = True, **kwargs: Dict[str, Any]) → pandas.DataFrame | AsyncJob[source]¶

Executes the query representing this DataFrame and returns the result as a Pandas DataFrame.

When the data is too large to fit into memory, you can use to_pandas_batches().

Parameters:
  • statement_params – Dictionary of statement level parameters to be set while executing this action.

  • block – A bool value indicating whether this function will wait until the result is available. When it is False, this function executes the underlying queries of the dataframe asynchronously and returns an AsyncJob.

Note

  1. This method is only available if Pandas is installed and available.

2. If you use Session.sql() with this method, the input query of Session.sql() can only be a SELECT statement.