(self, numba_common_dtype)
return func_text, global_vars
Example of generated implementation:
        def sdc_pandas_dataframe_values_impl(self):
          length = len(self._data[0][0])
          col_data_0 = self._data[0][0]
          col_data_1 = self._data[1][0]
          col_data_2 = self._data[0][1]
          values = numpy.empty(length*3, numpy.dtype("float64"))
          for i in range(length):
            values[i*3+0] = col_data_0[i]
            values[i*3+1] = col_data_1[i]
            values[i*3+2] = col_data_2[i]
          return values.reshape(length, 3)
Example of generated implementation:
        def sdc_pandas_dataframe_values_impl(self):
          length = len(self._data[0][0])
          col_data_0 = self._data[0][0]
          col_data_1 = self._data[1][0]
          col_data_2 = self._data[0][1]
          values = numpy.empty(length*3, numpy.dtype("float64"))
          for i in range(length):
            values[i*3+0] = col_data_0[i]
            values[i*3+1] = col_data_1[i]
            values[i*3+2] = col_data_2[i]
          return values.reshape(length, 3)
Example of generated implementation : def sdc_pandas_dataframe_values_impl ( self ) : length = len ( self . _data [ 0 ] [ 0 ] ) col_data_0 = self . _data [ 0 ] [ 0 ] col_data_1 = self . _data [ 1 ] [ 0 ] col_data_2 = self . _data [ 0 ] [ 1 ] values = numpy . empty ( length * 3 numpy . dtype ( float64 )) for i in range ( length ) : values [ i * 3 + 0 ] = col_data_0 [ i ] values [ i * 3 + 1 ] = col_data_1 [ i ] values [ i * 3 + 2 ] = col_data_2 [ i ] return values . reshape ( length 3 )
def sdc_pandas_dataframe_values_codegen(self, numba_common_dtype):
    """
    Example of generated implementation:
        def sdc_pandas_dataframe_values_impl(self):
          length = len(self._data[0][0])
          col_data_0 = self._data[0][0]
          col_data_1 = self._data[1][0]
          col_data_2 = self._data[0][1]
          values = numpy.empty(length*3, numpy.dtype("float64"))
          for i in range(length):
            values[i*3+0] = col_data_0[i]
            values[i*3+1] = col_data_1[i]
            values[i*3+2] = col_data_2[i]
          return values.reshape(length, 3)
    """
    columns_data = []
    columns_num = len(self.columns)
    func_lines = [
        f'def sdc_pandas_dataframe_values_impl(self):',
        f'  length = len(self._index)',
    ]
    for i, col in enumerate(self.columns):
        col_loc = self.column_loc[col]
        type_id, col_id = col_loc.type_id, col_loc.col_id
        func_lines += [
            f'  col_data_{i} = self._data[{type_id}][{col_id}]',
        ]
        columns_data.append(f'col_data_{i}')

    func_lines += [
        f'  values = numpy.empty(length*{columns_num}, numpy.dtype("{numba_common_dtype}"))',
        f'  for i in range(length):',
    ]
    func_lines += ['\n'.join([
        f'    values[i*{columns_num}+{j}] = {columns_data[j]}[i]',
    ]) for j in range(columns_num)]
    func_lines += [
        f'  return values.reshape(length, {columns_num})\n'
    ]
    func_text = '\n'.join(func_lines)
    global_vars = {'pandas': pandas, 'numpy': numpy}

    return func_text, global_vars
def sdc_pandas_dataframe_values_codegen ( self , numba_common_dtype ) : columns_data = [ ] columns_num = len ( self . columns ) func_lines = [ f'def sdc_pandas_dataframe_values_impl(self):' , f'  length = len(self._index)' , ] for i , col in enumerate ( self . columns ) : col_loc = self . column_loc [ col ] type_id , col_id = col_loc . type_id , col_loc . col_id func_lines += [ f'  col_data_{i} = self._data[{type_id}][{col_id}]' , ] columns_data . append ( f'col_data_{i}' ) func_lines += [ f'  values = numpy.empty(length*{columns_num}, numpy.dtype("{numba_common_dtype}"))' , f'  for i in range(length):' , ] func_lines += [ '\n' . join ( [ f'    values[i*{columns_num}+{j}] = {columns_data[j]}[i]' , ] ) for j in range ( columns_num ) ] func_lines += [ f'  return values.reshape(length, {columns_num})\n' ] func_text = '\n' . join ( func_lines ) global_vars = { 'pandas' : pandas , 'numpy' : numpy } return func_text , global_vars