Answers from HYRY and Marius in comments!
One can check either by:
-
testing equivalence of the
values.baseattribute rather than thevaluesattribute, as in:df.values.base is df2.values.baseinstead ofdf.values is df2.values. -
or using the (admittedly internal)
_is_viewattribute (df2._is_viewisTrue).
Thanks everyone!