def _concat_categorical(to_concat, axis=<NUM_LIT:0>):
<EOL>categoricals = [x for x in to_concat if is_categorical_dtype(x.dtype)]<EOL>if len(categoricals) != len(to_concat):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>first = to_concat[<NUM_LIT:0>]<EOL>if all(first.is_dtype_equal(other) for other in to_concat[<NUM_LIT:1>:]):<EOL><INDENT>return union_categoricals(categoricals)<EOL><DEDENT><DEDENT>to_concat = [x.get_values() if is_categorical_dtype(x.dtype)<EOL>else np.asarray(x).ravel() if not is_datetime64tz_dtype(x)<EOL>else np.asarray(x.astype(object)) for x in to_concat]<EOL>result = _concat_compat(to_concat)<EOL>if axis == <NUM_LIT:1>:<EOL><INDENT>result = result.reshape(<NUM_LIT:1>, len(result))<EOL><DEDENT>return result<EOL>
Concatenate an object/categorical array of arrays, each of which is a
    single dtype

    Parameters
    ----------
    to_concat : array of arrays
    axis : int
        Axis to provide concatenation in the current implementation this is
        always 0, e.g. we only have 1D categoricals

    Returns
    -------
    Categorical
        A single array, preserving the combined dtypes