无法获取GET请求的响应

时间:2018-12-31 19:29:07

标签: python-3.x linkedin-api

我正在尝试使用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())

0 个答案:

没有答案