'int' 对象在执行 tokenizer.fit_on_text(d['column_name']) 时没有属性 'lower'

'int' object has no attribute 'lower' while doing tokenizer.fit_on_text(d['column_name'])

tokenizer=Tokenizer(num_words=1000, split=' ')
tokenizer.fit_on_texts(d['column'].values)

x=tokenizer.texts_to_sequences(d['column'].values)

在 POS_words 列中,我有所有具有技能(C#、Office365、...)的句子,但有一些没有。 +91.

我想把它转换成数组但是它抛出错误

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-a59a11ef92f5> in <module>()
      1 tokenizer=Tokenizer(num_words=1000, split=' ')
----> 2 tokenizer.fit_on_texts(d['POS_words'].values)
      3 
      4 x=tokenizer.texts_to_sequences(d['POS_words'].values)
      5 #xtest=tokenizer.texts_to_sequences(test['POS_words'].values)

1 frames
/usr/local/lib/python3.7/dist-packages/keras_preprocessing/text.py in text_to_word_sequence(text, filters, lower, split)
     41     """
     42     if lower:
---> 43         text = text.lower()
     44 
     45     if sys.version_info < (3,):

AttributeError: 'int' object has no attribute 'lower'

请告诉我如何解决这个问题

问题已解决

d['column']=d['column'].astype(str)