votes up 2

Input must be a list-like for parameter `columns`

Package:
pandas
github stars 30911
Exception Class:
TypeError

Raise code

    dtypes_to_encode = ["object", "category"]

    if isinstance(data, DataFrame):
        # determine columns being encoded
        if columns is None:
            data_to_encode = data.select_dtypes(include=dtypes_to_encode)
        elif not is_list_like(columns):
            raise TypeError("Input must be a list-like for parameter `columns`")
        else:
            data_to_encode = data[columns]

        # validate prefixes and separator to avoid silently dropping cols
        def check_len(item, name):

            if is_list_like(item):
😲  Walkingbet is Android app that pays you real bitcoins for a walking. Withdrawable real money bonus is available now, hurry up! 🚶

Ways to fix

votes up 2 votes down

https://fixexception.com/pandas/input-must-be-a-list-like-for-parameter-columns/

Oct 22, 2022 Lightewave answer
Lightewave 1.5k

Add a possible fix

Please authorize to post fix