unexpected indentエラー

525 ワード

unexpected indentはインデントエラーです.
def get_train_test(test_size=0.95):
  """Split Data into train ans test sets."""
   y = 1*(df.cand_pty_affiliation =='REP')
    X = df.drop(["cand_pty_affiliation"], axis=1)

以下に変更すればよい
def get_train_test(test_size=0.95):
    """Split Data into train ans test sets."""
    y = 1*(df.cand_pty_affiliation =='REP')
    X = df.drop(["cand_pty_affiliation"], axis=1)