What is the proper way to import the new pyspark.pandas library?

cconnell
Contributor II

I am moving an existing, working pandas program into Databricks. I want to use the new pyspark.pandas library, and change my code as little as possible. It appears that I should do the following:

1) Add from pyspark import pandas as ps at the top

2) Change all occurrences of pd.pandas_function to ps.pandas_function

Is this correct?