def correl_ts(frame1, frame2):
 results = {}
 for (col, series) in compat.iteritems(frame1):
  if (col in frame2):
   other = frame2[col]
   idx1 = series.valid().index
   idx2 = other.valid().index
   common_index = idx1.intersection(idx2)
   seriesStand = zscore(series.reindex(common_index))
   otherStand = zscore(other.reindex(common_index))
   results[col] = (seriesStand * otherStand).mean()
 return Series(results)

def correl_ts ( frame1 , frame2 ) : results = { } for ( col , series ) in compat . iteritems ( frame1 ) : if ( col in frame2 ) : other = frame2 [ col ] idx1 = series . valid ( ) . index idx2 = other . valid ( ) . index common_index = idx1 . intersection ( idx2 ) seriesStand = zscore ( series . reindex ( common_index ) ) otherStand = zscore ( other . reindex ( common_index ) ) results [ col ] = ( seriesStand * otherStand ) . mean ( ) return Series ( results )
pairwise correlation of columns of two dataframe objects parameters returns y : series .