Return a `pandas.DataFrame` containing Python type information for the
    columns in `data_frame`.

    Args:

        data_frame (pandas.DataFrame) : Data frame containing data columns.

    Returns:

        (pandas.DataFrame) : Data frame indexed by the column names from
            `data_frame`, with the columns `'i'` and `'dtype'` indicating the
            index and Python type of the corresponding `data_frame` column,
            respectively.

def get_py_dtypes(data_frame):
    '''
    Return a `pandas.DataFrame` containing Python type information for the
    columns in `data_frame`.

    Args:

        data_frame (pandas.DataFrame) : Data frame containing data columns.

    Returns:

        (pandas.DataFrame) : Data frame indexed by the column names from
            `data_frame`, with the columns `'i'` and `'dtype'` indicating the
            index and Python type of the corresponding `data_frame` column,
            respectively.
    '''
    df_py_dtypes = data_frame.dtypes.map(get_py_dtype).to_frame('dtype').copy()
    df_py_dtypes.loc[df_py_dtypes.dtype == object, 'dtype'] = \
        (df_py_dtypes.loc[df_py_dtypes.dtype == object].index
         .map(lambda c: str if data_frame[c]
              .map(lambda v: isinstance(v, str)).all() else object))

    df_py_dtypes.insert(0, 'i', range(df_py_dtypes.shape[0]))
    df_py_dtypes.index.name = 'column'
    return df_py_dtypes