In order to replace a value in Pandas DataFrame, use the replace() method with the column the from and to values . Below example replace Spark with PySpark value on the Course column. Notice that all the Spark values are replaced with the Pyspark values under the first column.