def adjustments_from_deltas_with_sids(dense_dates, sparse_dates, column_idx, column_name, asset_idx, deltas):
 ad_series = deltas[AD_FIELD_NAME]
 adjustments = defaultdict(list)
 for (sid, per_sid) in deltas[column_name].iteritems():
  idx = asset_idx[sid]
  for (kd, v) in per_sid.iteritems():
   adjustments[dense_dates.searchsorted(kd)].extend(overwrite_from_dates(ad_series.loc[(kd, sid)], dense_dates, sparse_dates, (idx, idx), v))
 return dict(adjustments)

def adjustments_from_deltas_with_sids ( dense_dates , sparse_dates , column_idx , column_name , asset_idx , deltas ) : ad_series = deltas [ AD_FIELD_NAME ] adjustments = defaultdict ( list ) for ( sid , per_sid ) in deltas [ column_name ] . iteritems ( ) : idx = asset_idx [ sid ] for ( kd , v ) in per_sid . iteritems ( ) : adjustments [ dense_dates . searchsorted ( kd ) ] . extend ( overwrite_from_dates ( ad_series . loc [ ( kd , sid ) ] , dense_dates , sparse_dates , ( idx , idx ) , v ) ) return dict ( adjustments )
collect all the adjustments that occur in a dataset that has a sid column .