use arrry to applySchema and infer schema in Python