filmov
tv
23. Pandas TypeError: unhashable type: 'list'/'dict'
Показать описание
Pandas TypeError: unhashable type: 'list'/'dict'
Table of Contents
Step #1: TypeError: unhashable type: 'list'/'dict'
Step #2: How to detect if column contains list or dict
Step #3: Convert the column to string and apply value_counts
Step #4: Convert list/dict column to tuple
Step #5: Expand the list column
Step #6: List column mixed: strings and list items
Bonus Step #1: Correct way to expand list column
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Bonus resources
Pandas How to count unique values in column list
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Code store
Socials
Table of Contents
Step #1: TypeError: unhashable type: 'list'/'dict'
Step #2: How to detect if column contains list or dict
Step #3: Convert the column to string and apply value_counts
Step #4: Convert list/dict column to tuple
Step #5: Expand the list column
Step #6: List column mixed: strings and list items
Bonus Step #1: Correct way to expand list column
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Bonus resources
Pandas How to count unique values in column list
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Code store
Socials