You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The str.cat-accessor works for CategoricalIndex as target, but not as caller. This is inconsistent.
a = pd.Index(['a', 'b', 'a'])
b = pd.Index(['a', 'b', 'a'], dtype='category')
a.str.cat(b)
# Index(['aa', 'bb', 'aa'], dtype='object')
b.str.cat(a)
# AttributeError: Can only use .str accessor with string values (i.e. inferred_type is 'string', 'unicode' or 'mixed')
The text was updated successfully, but these errors were encountered:
@WillAyd
this was just a toy example - if there's more to concatenate, it gets more unwieldy. But more than that, it makes no sense that a.str.cat(b) works, but b.str.cat(a) doesn't.
The
str.cat
-accessor works for CategoricalIndex as target, but not as caller. This is inconsistent.The text was updated successfully, but these errors were encountered: