Closed
Description
Ref: #41022 (comment)
Currently, the implementation is
Lines 278 to 281 in 40274ac
This means that any list-like that is not a tuple nor list will be packed as a single element list, which is likely undesirable. For example, pd.crosstab
works with ndarrays/Series but not lists/tuples for this reason (issue to come). I propose to change this method to:
def maybe_make_list_like(obj):
if obj is None or is_list_like(obj):
return obj
else:
return [obj]
I plan update this issue, listing out each part of the code that calls this function and what actions to take.