title: Hide a column if the same value is repeated across all rows
body: <p>here is a sample data.</p>
  
  <pre><code>import pandas as pd
  from StringIO import StringIO
  import numpy as np
  
  audit_trail = """\
  1|2|ENQ-wbrProcess.php|bus_departures|BUS_SERVICE_NO#DEPARTURE_TM|54790#01/12/2010|BOOKING_STATUS|O|L|PHRTD|2010-12-01 12:42:32
  5|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|BUS_TYPE_CD||DO|PHRTD|2010-12-01 12:43:27
  9|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|EFFECTIVE_FROM||2010-12-02 00:00:00|PHRTD|2010-12-01 12:43:28
  13|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|MAX_CHANCE_SEATS||0|PHRTD|2010-12-01 12:43:28
  17|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|SCHEDULED_NO||15|PHRTD|2010-12-01 12:43:29
  21|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|TRIP_NATURE||Basic|PHRTD|2010-12-01 12:43:29
  25|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|PARCEL_SERVICE||N|PHRTD|2010-12-01 12:43:30
  29|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|TRIP_NO||S11308|PHRTD|2010-12-01 12:43:30
  33|0|DTO-transfer.php|bus_services|BUS_SERVICE_NO|159734|IS_AVL_RESERVATION||N|PHRTD|2010-12-01 12:43:31
  37|0|DTO-transfer.php|bus_service_seats|BUS_SERVICE_NO|159734|BUS_SERVICE_NO||159734|PHRTD|2010-12-01 12:43:32"""
  
  col_list = ['transaction_id', 'request_id', 'table_name', 'table_unique_field', 'table_unique_value', 'field_name', 'old_value', 'new_value', 'client_id', 'client_type', 'transaction_date']
  audit = pd.read_csv(StringIO(audit_trail), sep="|" , names = col_list, index_col='transaction_date' )
  
  In [44]: audit.client_type.nunique()
  Out[44]: 1
  </code></pre>
  
  <p>This will return the rows if client type is "PHRTD"</p>
  
  <pre><code>audit[(audit.client_type == 'PHRTD')] [['old_value', 'client_type']]
  </code></pre>
  
  <p>If the unique count of client_type is 1 then show both the columns or else show only 1 column (old_value). Something like this will not work:</p>
  
  <pre><code>audit[(if(audit.client_type.nunique() != 1), [['old_value', 'client_type'], ['old_value']])]
  </code></pre>
  
  <p>I am looking for a simple technique to hide the columns where the same value is repeated across all rows.</p>