Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搜狐2022推荐nlp_training里报错TypeError: list indices must be integers or slices, not str #8

Open
ArtificialZeng opened this issue Jul 14, 2022 · 0 comments

Comments

@ArtificialZeng
Copy link


TypeError Traceback (most recent call last)
/tmp/ipykernel_33/3809147022.py in
6 di['id'] = f'{row["id"]}_{entity}'
7 di['text'] = f'实体: {entity} [SEP] ' + row['content']
----> 8 di['label'] = row['entity'][entity]
9 train_data.append(di)
10

TypeError: list indices must be integers or slices, not str

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant