32
Say I have a dataframe
import pandas as pd
import numpy as np
foo = pd.DataFrame(np.random.random((10,5)))
and I create another dataframe from a subset of my data:
bar = foo.iloc[3:5,1:4]
does bar hold a copy of those elements from foo? Is there any way to create a view of that data instead? If so, what would happen if I try to modify data in this view? Does Pandas provide any sort of copy-on-write mechanism?