def _concat_same_dtype(self, to_concat, name):
codes = np.concatenate([self._is_dtype_compat(c).codes<EOL>for c in to_concat])<EOL>result = self._create_from_codes(codes, name=name)<EOL>result.name = name<EOL>return result<EOL>
Concatenate to_concat which has the same class
ValueError if other is not in the categories