df = pd.DataFrame(np.random.randn(2, 10), columns=
    'Time A_x A_y A_z B_x B_y B_z C_x C_y C-Z'.split())
X = df.filter(regex='_x')
Y = df.filter(regex='_y')
Splitting pandas data frame based on column name