title: The right way to use the new pyspark.pandas?
body: <p>This recent blog post from Databricks <a href="https://databricks.com/blog/2021/10/04/pandas-api-on-upcoming-apache-spark-3-2.html" rel="noreferrer">https://databricks.com/blog/2021/10/04/pandas-api-on-upcoming-apache-spark-3-2.html</a> says that the only change needed to a pandas program to run it under pyspark.pandas is to change <code>from pandas import read_csv</code> to <code>from pyspark.pandas import read_csv</code>.</p>
  <p>But that does not seem right. What about all the other (non <code>read_csv</code>) references to pandas? Isn't the right approach to change <code>import pandas as pd</code> to <code>import pyspark.pandas as pd</code>? Then all the other pandas references in your existing program will point to the pyspark version of pandas.</p>