By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,025 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,025 IT Pros & Developers. It's quick & easy.

i have written a python code and getting an error as 'type' object is not subscriptab

P: 1
Expand|Select|Wrap|Line Numbers
  1. data['content'] = data['content'].map(lambda x: cleaning(x))
  2. data = data.reset_index(drop=True)
  3. for i in range(len(data)):
  4.     words = data.content[i][0]
  5.     for j in range(len(data.content[i])-1):
  6.         words+= ' ' + data.content[i][j+1]
  7.     data.content[i] = words
Mar 28 '20 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.