riptable
riptable copied to clipboard
outer merge breaks ``Categorical`` columns
A user reported an issue with outer merge:
I was performing an outer merge today where one of the merge columns was stored as a categorical in the right dataset. The merge raised no errors, but in the merged dataset the categoricals showed up as integers. I got similar behavior when only the left column was a categorical. Here is a small code example:
left = rt.Dataset({'symbol':['AAAA','BBBBB'],'shares':[-2,5]})
right = rt.Dataset({'symbol':['AAAA','CCCC','DDDD'],'vehicles':['boat','car','bike']})
right['symbol'] = rt.Cat(right.symbol)
rt.merge2(left,right, on='symbol', how = 'outer')