Why is a DataFrameStatFunctions object not equal to a copy of itself?

Viewed 20

In pyspark, the DataFrame class has an Attribute stat. Calling it creates an object of type DataFrameStatFunctions.
I created a DataFrame called df, and then ran the following code:

dfstat = df.stat
dfstat == df.stat

The result came back False. I believe this has to do with pointers, or maybe shallow copies or something. Can anyone help me understand why the stat attribute of a pyspark DataFrame is not equal to a copy of itself?

stat attribute source code
DataFrame documentation

0 Answers
Related