Am trying to use SQL, but createOrReplaceTempView("myDataView")​ fails

MikeBrewer
New Contributor II

Am trying to use SQL, but createOrReplaceTempView("myDataView") fails.

I can create and display a DataFrame fine...

import pandas as pd
df = pd.DataFrame(['$3,000,000.00','$3,000.00', '$200.5', '$5.5'], columns = ['Amount'])
df

I add another cell, but it fails...

df.createOrReplaceTempView("myDataView")

I get this error..

'DataFrame' object has no attribute 'createOrReplaceTempView'

I see this example out there on the net allot, but don't understand why it fails for me. I am using

Community edition. 6.5 (includes Apache Spark 2.4.5, Scala 2.11)