title: Creating a for loop to separate unique values into two lists
body: <p>Hello I am creating a for loop to separate the unique values into two lists. </p>
  
  <p>Describing the columns:</p>
  
  <pre><code>print(flight_data_finalcopy['UniqueCarrier'].describe())
  print(flight_data_finalcopy['Origin'].describe())
  print(flight_data_finalcopy['OriginCityName'].describe())
  print(flight_data_finalcopy['OriginStateName'].describe())
  </code></pre>
  
  <p>Which outputs:</p>
  
  <pre><code>Output:
  
         `count     433298
          unique        12
          top           WN
          freq      101335
          Name: UniqueCarrier, dtype: object
          count     433298
          unique       294
          top          ATL
          freq       29413
          Name: Origin, dtype: object
          count          433298
          unique            290
          top       Atlanta, GA
          freq            29413
          Name: OriginCityName, dtype: object
          count         433298
          unique            52
          top       California
          freq           54922
          Name: OriginStateName, dtype: object
  </code></pre>
  
  <p>My objective is two separate the uniquely described values into two different lists. One list should have the unique values &lt; 55 and the rest should go to the second list. It works but the problem is everything keeps appending to one list.Is there something I am missing? Assistance would be appreciated, thanks. Here is my code:</p>
  
  <pre><code>dummies_columns = []
  frequency_distribution_columns = []
  for column in categorical_columns:
      if (flight_data[column].unique) &lt;= 55:
          dummies_columns.append(column)
      else:
          frequency_distribution_columns.append(column)
  </code></pre>