Checking whether a Pandas object is a view or a copy
Start your free 7-days trial now!
To check whether a Pandas object is a view or a copy, use the
_is_view property like so:
head(~) method performs slicing under the hood, and so it is unpredictable whether a view or a copy is returned. Using
_is_view comes in handy for these scenarios.