Unhashable type 'list' while looping through dataframe in Python
TypeError: unhashable type: 'list'.

You will get this error when you are trying to put list as key in dictionary or set because list is unhashable object.
Example you trying to input code such as
dict1 ={ 1:'one', [2]:'two'}
print(dict1)

O/p:
TypeError Traceback (most recent call last)
&lt;ipython-input-73-c4e2fd1e6bf0&gt; in &lt;module&gt;
----&gt; 1 dict1 ={ 1:'one', [2]:'two'}
      2 print(dict1)
 
TypeError: unhashable type: 'list'

solution :
Try to convert the list into tuple
Hashable object in Python:

int
float
decimal
bool
string
tuple
complex
range
frozenset
bytes

UnHashable object in Python

list
set
dict
bytearray
customclasses