AttributeError: 'numpy.ndarray' object has no attribute 'split'
max_document_length = max([len(x.split(" ")) for x in x_data])
vocab_processor = learn.preprocessing.VocabularyProcessor(max_document_length)
AttributeError: 'numpy.ndarray' object has no attribute 'split'
max([len(x.split(" ")) for x in x_data]),你的x的数据类型可能是numpy,她是没有.split属性的,你把x转换为字符串,如str(x)
x_data是什么,是frame吗
报错说x是numpy.ndarray,
而你把x当做字符串在用了