create new df from selected columns pandas 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()