(drop, all_params, columns, column_loc)
return func_text, global_vars
Example of generated implementation:
        def _df_reset_index_impl(self, level=None, drop=False, inplace=False, col_level=0, col_fill=""):
          result_0 = self._data[0][0]
          result_1 = self._data[0][1]
          return pandas.DataFrame({"A": result_0, "B": result_1})
Example of generated implementation:
        def _df_reset_index_impl(self, level=None, drop=False, inplace=False, col_level=0, col_fill=""):
          result_0 = self._data[0][0]
          result_1 = self._data[0][1]
          return pandas.DataFrame({"A": result_0, "B": result_1})
Example of generated implementation : def _df_reset_index_impl ( self level = None drop = False inplace = False col_level = 0 col_fill = ) : result_0 = self . _data [ 0 ] [ 0 ] result_1 = self . _data [ 0 ] [ 1 ] return pandas . DataFrame ( { A : result_0 B : result_1 } )
def sdc_pandas_dataframe_reset_index_codegen(drop, all_params, columns, column_loc):
    """
    Example of generated implementation:
        def _df_reset_index_impl(self, level=None, drop=False, inplace=False, col_level=0, col_fill=""):
          result_0 = self._data[0][0]
          result_1 = self._data[0][1]
          return pandas.DataFrame({"A": result_0, "B": result_1})
    """
    result_name = []
    all_params_str = ', '.join(all_params)
    func_lines = [f'def _df_reset_index_impl({all_params_str}):']
    if not drop:
        old_index = 'old_index'
        func_lines += [f'  {old_index} = self.index']
        result_name.append((old_index, 'index'))
    for i, c in enumerate(columns):
        col_loc = column_loc[c]
        type_id, col_id = col_loc.type_id, col_loc.col_id
        result_c = f'result_{i}'
        func_lines += [
            f'  result_{i} = self._data[{type_id}][{col_id}]'
        ]
        result_name.append((result_c, c))
    data = ', '.join(f'"{column_name}": {column}' for column, column_name in result_name)
    func_lines += [f'  return pandas.DataFrame({{{data}}})']
    func_text = '\n'.join(func_lines)

    global_vars = {'pandas': pandas,
                   'numpy': numpy}

    return func_text, global_vars
def sdc_pandas_dataframe_reset_index_codegen ( drop , all_params , columns , column_loc ) : result_name = [ ] all_params_str = ', ' . join ( all_params ) func_lines = [ f'def _df_reset_index_impl({all_params_str}):' ] if not drop : old_index = 'old_index' func_lines += [ f'  {old_index} = self.index' ] result_name . append ( ( old_index , 'index' ) ) for i , c in enumerate ( columns ) : col_loc = column_loc [ c ] type_id , col_id = col_loc . type_id , col_loc . col_id result_c = f'result_{i}' func_lines += [ f'  result_{i} = self._data[{type_id}][{col_id}]' ] result_name . append ( ( result_c , c ) ) data = ', ' . join ( f'"{column_name}": {column}' for column , column_name in result_name ) func_lines += [ f'  return pandas.DataFrame({{{data}}})' ] func_text = '\n' . join ( func_lines ) global_vars = { 'pandas' : pandas , 'numpy' : numpy } return func_text , global_vars