我正在尝试使用LinkedIn Sales Api来获取响应,但是响应中却出现了'CSRF检查失败'或'{'状态':400}'。
以下是代码:
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
df = pd.DataFrame({'text': [['hello', 'world'],
['hello', 'stackoverflow', 'hello']]
})
## Join words to a single line as required by CountVectorizer
df['text'] = df['text'].apply(lambda x: ' '.join([word for word in x]))
vectorizer = CountVectorizer(lowercase=False)
x = vectorizer.fit_transform(df['text'].values)
print(vectorizer.get_feature_names())
print(x.toarray())