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

modin.pandas.to_pandas

snowflake.snowpark.modin.pandas.to_pandas(obj: Union[DataFrame, Series], *, statement_params: Optional[dict[str, str]] = None, **kwargs: Any) Union[DataFrame, Series][source]

Convert Snowpark pandas DataFrame or Series to pandas DataFrame or Series

Parameters:
  • obj – The object to be converted to native pandas. It must be either a Snowpark pandas DataFrame or Series

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

Returns:

pandas DataFrame or Series

Examples

>>> df = pd.DataFrame({'Animal': ['Falcon', 'Falcon',
...                               'Parrot', 'Parrot'],
...                    'Max Speed': [380., 370., 24., 26.]})
>>> pd.to_pandas(df)
   Animal  Max Speed
0  Falcon      380.0
1  Falcon      370.0
2  Parrot       24.0
3  Parrot       26.0
Copy
>>> pd.to_pandas(df['Animal'])
0    Falcon
1    Falcon
2    Parrot
3    Parrot
Name: Animal, dtype: object
Copy