def dict_to_pandas_data_frame(data, main_key_name=None, order=None, inverse
    =False):
    """
    Convert a dictionary to pandas.DataFrame

    Parameters
    ----------
    data : dict
        dictionary of handling
    main_key_name : str, optional
        if the json or dict does not have the main key as a single `{main_element : dict}` present, it needs to be specified
    order : dict, list, optional
        list with the column names in order or dict with specified key positions
    inverse : bool, optional
        if columns and rows shall be switched

    Returns
    -------
    pandas.DataFrame
        DataFrame representing the dictionary

    """
    if not isinstance(data, dict):
        raise TypeError
    if main_key_name and not isinstance(main_key_name, str):
        raise TypeError
    if not isinstance(inverse, bool):
        raise TypeError
    from ._helper import _create_sorted_list_from_order, _cast_main_key_name
    from pandas import DataFrame
    if not main_key_name:
        data, main_key_name = _cast_main_key_name(data)
    if not inverse:
        data_frame = DataFrame.from_dict(data, orient='index')
    else:
        data_frame = DataFrame.from_dict(data)
    data_frame.index.name = main_key_name
    if order:
        data_frame[main_key_name] = data_frame.index
        order = _create_sorted_list_from_order(order)
        data_frame = data_frame[order]
        data_frame.set_index(order[0], inplace=True)
    return data_frame
