def _ordered_append(dataframe, other):
    """
    Append `other` to `dataframe` while keeping the order of the columns
    in both.

    The `append` method that comes with pandas Dataframes alphabetizes
    the order of the columns, which may not always be desired. This
    function provides an alternative.

    :param dataframe: The DataFrame to append to.
    :type dataframe: pandas.DataFrame
    :param other: The data to append.
    :type other: pandas.DataFrame or pandas.Series/dict-like object,
        or list of these
    :return: New DataFrame with appended data.
    :rtype: pandas.DataFrame
    """
    # The new column order. New columns from `other` are inserted in
    # front of the original `dataframe` columns.
    columns = [
                  col for col in other.keys() if col not in dataframe.keys()
              ] + list(dataframe.keys())

    # pandas' append alphabetizes the columns here. Indexing the result
    # with `columns` sets our own column order.
    return dataframe.append(other, ignore_index=True)[columns]