Handle the `'edited'` signal from a `gtk.CellRenderer` to:

     * Update the corresponding entry in the list store.
     * Update the corresponding entry in the provided data frame instance.

    The callback can be connected to the cell renderer as follows:

        cell_renderer.connect('edited', on_edited_dataframe_sync, column,
                              list_store, df_py_dtypes, df_data)

    where `column` is the `gtk.TreeViewColumn` the cell renderer belongs to,
    and `df_py_dtypes` and `list_store` are the return values from calling
    `get_list_store` on the `df_data` data frame.

    Args:

        cell_renderer (gtk.CellRenderer)
        iter (str) : Gtk TreeView iterator
        new_value (str) : New value resulting from edit operation.
        column (gtk.TreeViewColumn) : Column containing edited cell.
        df_py_dtypes (pandas.DataFrame) : Data frame containing type
            information for columns in tree view (and `list_store`).
        list_store (gtk.ListStore) : Model containing data bound to tree view.
        df_data (pandas.DataFrame) : Data frame containing data in `list_store`.

    Returns:

        None

def on_edited_dataframe_sync(cell_renderer, iter, new_value, column,
                             df_py_dtypes, list_store, df_data):
    '''
    Handle the `'edited'` signal from a `gtk.CellRenderer` to:

     * Update the corresponding entry in the list store.
     * Update the corresponding entry in the provided data frame instance.

    The callback can be connected to the cell renderer as follows:

        cell_renderer.connect('edited', on_edited_dataframe_sync, column,
                              list_store, df_py_dtypes, df_data)

    where `column` is the `gtk.TreeViewColumn` the cell renderer belongs to,
    and `df_py_dtypes` and `list_store` are the return values from calling
    `get_list_store` on the `df_data` data frame.

    Args:

        cell_renderer (gtk.CellRenderer)
        iter (str) : Gtk TreeView iterator
        new_value (str) : New value resulting from edit operation.
        column (gtk.TreeViewColumn) : Column containing edited cell.
        df_py_dtypes (pandas.DataFrame) : Data frame containing type
            information for columns in tree view (and `list_store`).
        list_store (gtk.ListStore) : Model containing data bound to tree view.
        df_data (pandas.DataFrame) : Data frame containing data in `list_store`.

    Returns:

        None
    '''
    # Extract name of column (name of TreeView column must match data frame
    # column name).
    column_name = column.get_name()
    # Look up the list store column index and data type for column.
    i, dtype = df_py_dtypes.ix[column_name]
    # Update the list store with the new value.
    if dtype == float:
        value = si_parse(new_value)
    elif dtype == bool:
        value = not list_store[iter][i]

    if value == list_store[iter][i]:
        # Value has not changed.
        return False
    list_store[iter][i] = value
    # Update the data frame with the new value.
    df_data[column_name].values[int(iter)] = value
    return True