

def _transform_row(self, row, schema):
    'Apply the given schema to the given BigQuery data row.\n\n        Parameters\n        ----------\n        row\n            A single BigQuery row to transform\n        schema : list\n            The BigQuery table schema to apply to the row, specifically\n            the list of field dicts.\n\n        Returns\n        -------\n        dict\n            Mapping schema to row\n        '
    log = {
        
    }
    for (index, col_dict) in enumerate(schema):
        col_name = col_dict['name']
        row_value = row['f'][index]['v']
        if (row_value is None):
            log[col_name] = None
            continue
        if (col_dict['type'] == 'RECORD'):
            row_value = self._recurse_on_row(col_dict, row_value)
        elif (col_dict['type'] == 'INTEGER'):
            row_value = int(row_value)
        elif (col_dict['type'] == 'FLOAT'):
            row_value = float(row_value)
        elif (col_dict['type'] == 'BOOLEAN'):
            row_value = (row_value in ('True', 'true', 'TRUE'))
        elif (col_dict['type'] == 'TIMESTAMP'):
            row_value = float(row_value)
        log[self] = row_value
    return log

dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py BigQueryClient._transform_row/VarMisuse@189/402 `col_name`->`self`