create a new dataframe from an existing dataframe code example
Example 1: copy only some columns to new dataframe in r
new = old[['A', 'C', 'D']].copy()
Example 2: copy only some columns to new dataframe in r
new = pd.DataFrame([old.A, old.B, old.C]).transpose()