Answers from HYRY and Marius in comments!
One can check either by:
-
testing equivalence of the
values.base
attribute rather than thevalues
attribute, as in:df.values.base is df2.values.base
instead ofdf.values is df2.values
. -
or using the (admittedly internal)
_is_view
attribute (df2._is_view
isTrue
).
Thanks everyone!