copy columns from one dataframe to another r 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()