title: Why am I getting an error saying unhashable list?
body: <p>This is the code that I'm running on PyCharm and keep getting an error saying if form in exceptions:
  TypeError: unhashable type: 'list'. I am new to python. Kindly help me out<br />
  <a href="https://i.stack.imgur.com/H8WR9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H8WR9.png" alt="enter image description here" /></a></p>
  <pre><code>        import matplotlib.pyplot as plt
          import pandas as pd
          import nltk
          
          data=pd.read_excel(r&quot;C:\Users\amgup\Downloads\classification\Model_Dataset.xlsx&quot;, usecols=['Category','Title','Description'])
          
          # Combining title and description into one column
          data['combined']= (data['Title']+' '+data['Description']).str.lower()
          data=data.drop(columns=['Title','Description'])
          print(data)
          
          # shuffling the order of the rows. sample() returns random rows from the data and frac specifies what fraction has to be returned
          # frac=1 means the entire data in a random order
          data=data.sample(frac=1)
          print(data)
          
          # Counting the numnber of times each category has appeared
          count=data['Category'].value_counts()
          print(count)
          
          # Creating a barplot of the count
          bar_plot=plt.barh(count.keys(),count.values)
          plt.savefig(r&quot;C:\Users\amgup\Downloads\classification\barplot_of_categories.png&quot;)
          
          y=list(data['combined'])
          print(y)
          
          #lemmatization
          from nltk.corpus import stopwords
          nltk.download('stopwords')
          stop_words = set(stopwords.words('english'))
          tokens=[]
          from nltk.stem import WordNetLemmatizer
          nltk.download('wordnet')
          lemmatizer = WordNetLemmatizer()
          for x in y:
              x = str(x)
              x = x.lower()
              x = x.split()
              x = [lemmatizer.lemmatize(x) for word in x if word not in stop_words]
              x = ' '.join(x)
              tokens.append(x)
          print(tokens)
  </code></pre>