(self, idx)
return func_text, global_vars
Example of generated implementation with provided index:
        def _df_getitem_bool_series_idx_impl(self, idx):
          self_index = self._index
          if len(self_index) > len(idx):
            msg = "Unalignable boolean Series provided as indexer " + \
                  "(index of the boolean Series and of the indexed object do not match)."
            raise IndexingError(msg)
          # do not trim idx._data to df length as getitem_by_mask handles such case
          res_index = getitem_by_mask(self_index, idx._data)
          # df index is default, same as positions so it can be used in take
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, res_index)
          data_1 = self._data[0][1]
          res_data_1 = sdc_take(data_1, res_index)
          data_2 = self._data[0][2]
          res_data_2 = sdc_take(data_2, res_index)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
Example of generated implementation with provided index:
        def _df_getitem_bool_series_idx_impl(self, idx):
          self_index = self._index
          if len(self_index) > len(idx):
            msg = "Unalignable boolean Series provided as indexer " + \
                  "(index of the boolean Series and of the indexed object do not match)."
            raise IndexingError(msg)
          # do not trim idx._data to df length as getitem_by_mask handles such case
          res_index = getitem_by_mask(self_index, idx._data)
          # df index is default, same as positions so it can be used in take
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, res_index)
          data_1 = self._data[0][1]
          res_data_1 = sdc_take(data_1, res_index)
          data_2 = self._data[0][2]
          res_data_2 = sdc_take(data_2, res_index)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
Example of generated implementation with provided index : def _df_getitem_bool_series_idx_impl ( self idx ) : self_index = self . _index if len ( self_index ) > len ( idx ) : msg = Unalignable boolean Series provided as indexer + \ ( index of the boolean Series and of the indexed object do not match ) . raise IndexingError ( msg ) # do not trim idx . _data to df length as getitem_by_mask handles such case res_index = getitem_by_mask ( self_index idx . _data ) # df index is default same as positions so it can be used in take data_0 = self . _data [ 0 ] [ 0 ] res_data_0 = sdc_take ( data_0 res_index ) data_1 = self . _data [ 0 ] [ 1 ] res_data_1 = sdc_take ( data_1 res_index ) data_2 = self . _data [ 0 ] [ 2 ] res_data_2 = sdc_take ( data_2 res_index ) return pandas . DataFrame ( { A : res_data_0 B : res_data_1 C : res_data_2 } index = res_index )
def df_getitem_bool_series_idx_codegen(self, idx):
    """
    Example of generated implementation with provided index:
        def _df_getitem_bool_series_idx_impl(self, idx):
          self_index = self._index
          if len(self_index) > len(idx):
            msg = "Unalignable boolean Series provided as indexer " + \
                  "(index of the boolean Series and of the indexed object do not match)."
            raise IndexingError(msg)
          # do not trim idx._data to df length as getitem_by_mask handles such case
          res_index = getitem_by_mask(self_index, idx._data)
          # df index is default, same as positions so it can be used in take
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, res_index)
          data_1 = self._data[0][1]
          res_data_1 = sdc_take(data_1, res_index)
          data_2 = self._data[0][2]
          res_data_2 = sdc_take(data_2, res_index)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
    """
    func_lines = ['def _df_getitem_bool_series_idx_impl(self, idx):']
    func_lines += df_getitem_bool_series_idx_main_codelines(self, idx)
    func_text = '\n'.join(func_lines)
    global_vars = {'pandas': pandas, 'numpy': numpy,
                   'getitem_by_mask': getitem_by_mask,
                   'sdc_take': nplike_take,
                   'sdc_reindex_series': sdc_reindex_series,
                   'IndexingError': IndexingError}

    return func_text, global_vars
def df_getitem_bool_series_idx_codegen ( self , idx ) : func_lines = [ 'def _df_getitem_bool_series_idx_impl(self, idx):' ] func_lines += df_getitem_bool_series_idx_main_codelines ( self , idx ) func_text = '\n' . join ( func_lines ) global_vars = { 'pandas' : pandas , 'numpy' : numpy , 'getitem_by_mask' : getitem_by_mask , 'sdc_take' : nplike_take , 'sdc_reindex_series' : sdc_reindex_series , 'IndexingError' : IndexingError } return func_text , global_vars