Skip to content

Object has no attribute Error #5

@ProgrammingWithCybineer

Description

@ProgrammingWithCybineer

Receiving Error below:
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
C:\Users\Cybineer\AppData\Local\Programs\Python\Python39\lib\site-packages\pyspark\sql\context.py:601: FutureWarning: HiveContext is deprecated in Spark 2.0.0. Please use SparkSession.builder.enableHiveSupport().getOrCreate() instead.
warnings.warn(
Traceback (most recent call last):
File "c:\Users\Cybineer\Desktop\Python_Shark_Attack_Analysis\sharkattackdata.py", line 38, in
sharkAttackData()
File "c:\Users\Cybineer\Desktop\Python_Shark_Attack_Analysis\sharkattackdata.py", line 20, in sharkAttackData
hc.createOrReplaceTempView("temp_data")
File "C:\Users\Cybineer\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\generic.py", line 5575, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'createOrReplaceTempView'
PS C:\Users\Cybineer\Desktop\Python_Shark_Attack_Analysis> SUCCESS: The process with PID 8312 (child process of PID 40244) has been terminated.
SUCCESS: The process with PID 40244 (child process of PID 16200) has been terminated.
SUCCESS: The process with PID 16200 (child process of PID 30388) has been terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions