drop_duplicates unhashable type: ‘numpy.ndarray’, ‘set’ and ‘list’ in Pandas

TypeError: unhashable type: ‘numpy.ndarray’ The error you’re encountering, unhashable type: ‘numpy.ndarray’, indicates that you’re trying to use drop_duplicates on a column containing NumPy arrays, which are unhashable. You need to convert the arrays into hashable types before using drop_duplicates. Here’s how you can achieve that: This will correctly drop duplicates based on the ‘A’ column, […]

drop_duplicates unhashable type: ‘numpy.ndarray’, ‘set’ and ‘list’ in Pandas Read More »