title: Python dfply library verb select returns TypeError: len() of unsized object when reordering columns
body: <p>I am getting a strange error when running the following code (all provided for reproducibility). It reads a dataset from WRDS data provider using username and password for the given account and hence accesses the API. I then obtain a data frame df and do some dfply manipulations to it. Last task 2b, is meant to re-order the columns of the data frame (i.e. select all columns but in different order, hence re-ordering them), but I am getting an error there TypeError: len() of unsized object.</p>
  <pre><code>import pandas as pd             # dataframe library
  import wrds                     # wrds connection library
  from dfply import *             # data manipulation library
  
  conn = wrds.Connection(wrds_username = 'username') # insert your wrds website username
  df = conn.raw_sql(&quot;&quot;&quot;select gvkey, datadate, fyear, indfmt, consol, popsrc, datafmt, conm, curncd, curcd, fyr, sich, at, ni, revt, teq
                      from comp.funda 
                      where (fyear &gt;= 2011) and (fyear &lt;= 2022) and
                                ((conm = 'AMERICAN AIRLINES GROUP INC' or
                                 conm = 'APPLE INC' or
                                 conm = 'EXXON MOBIL CORP' or
                                 conm = 'GENERAL ELECTRIC CO' or
                                 conm = 'BANK OF AMERICA CORP' or
                                 conm = 'NIKE INC  -CL B' or
                                 conm = 'MICROSOFT CORP' or
                                 conm = 'AMAZON.COM INC' or
                                 conm = 'NETFLIX INC' or
                                 conm = 'TESLA INC') and
                                 (indfmt = 'INDL' and
                                 datafmt = 'STD'))
                      &quot;&quot;&quot;, 
                      date_cols=['datadate'])
  df = (df &gt;&gt; 
         arrange(X.fyear, X.conm)
       )
  df = (df &gt;&gt; 
         drop(X.indfmt, X.consol, X.popsrc, X.datafmt, X.curncd)
       ) 
  
  # 2a) Re-order rows based on compnay name (alphabetical order)
  #    i.e. re-order data based on alphabetical order of conm
  df = (df &gt;&gt; 
         arrange(X.conm)
       ) 
  
  # 2b) Re-order columns (see order in TenCo_ROE sheet)
  #    i.e. re-order data based on given order of columns
  df = (df &gt;&gt; 
         select(X.datadate, X.fyear, X.conm, X.gvkey, X.fyr, X.sich, X.at, X.ni, X.revt, X.teq, X.curcd)
       ) 
  
  This last part 2b returns an error: df = (df &gt;&gt; 
         drop(X.indfmt, X.consol, X.popsrc, X.datafmt, X.curncd)
       ) 
  
  # 2a) Re-order rows based on compnay name (alphabetical order)
  #    i.e. re-order data based on alphabetical order of conm
  df = (df &gt;&gt; 
         arrange(X.conm)
       ) 
  
  # 2b) Re-order columns (see order in TenCo_ROE sheet)
  #    i.e. re-order data based on given order of columns
  df = (df &gt;&gt; 
         select(X.datadate, X.fyear, X.conm, X.gvkey, X.fyr, X.sich, X.at, X.ni, X.revt, X.teq, X.curcd)
       ) 
  </code></pre>
  <p>There are 11 columns and I checked that everything is spelt correctly. Do not see what is the matter with this operation. Any ideas? The same approach works on another dataframe, so I am confused. This is the full error:</p>
  <pre><code>Traceback (most recent call last):
  
    Input In [10] in &lt;cell line: 1&gt;
      df = (df &gt;&gt;
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:142 in __rrshift__
      result = self.function(other_copy)
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:149 in &lt;lambda&gt;
      return pipe(lambda x: self.function(x, *args, **kwargs))
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:329 in __call__
      return self.function(*args, **kwargs)
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:279 in __call__
      args = self._recursive_arg_eval(df, args[1:])
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:241 in _recursive_arg_eval
      return [
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:243 in &lt;listcomp&gt;
      else self._symbolic_to_selector(df, a) if i in eval_as_selector
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:234 in _symbolic_to_selector
      return self._evaluator_loop(df, arg, self._evaluate_selector)
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:225 in _evaluator_loop
      return eval_func(df, arg)
  
    File ~/opt/anaconda3/envs/spyder2022/lib/python3.9/site-packages/dfply/base.py:217 in _evaluate_selector
      elif len(col_idx) &gt; 0:
  
  TypeError: len() of unsized object
  </code></pre>