Pandas: Subindexing dataframes: Copies vs views
Your answer lies in the pandas docs: returning-a-view-versus-a-copy. Whenever an array of labels or a boolean vector are involved in the indexing operation, the result will be a copy. With single label / scalar indexing and slicing, e.g. df.ix[3:6] or df.ix[:, ‘A’], a view will be returned. In your example, bar is a view of … Read more