title: summarize overlap with python
body: <p>I am analyzing DNA/Protein sequence data with python and got a problem.
  Here is the table of DNA sequence.</p>
  
  <p><img src="https://i.stack.imgur.com/b2ajg.jpg" alt="enter image description here"></p>
  
  <p>I want to analyze them as group1 and group2 are pair.
  For example, AAATTT_TTTCCC or GGGCCC_GGAAA are pairs.</p>
  
  <p>This sequence data sometimes shows same sequence.
  For instance, AAATTT appeared three times and AGTC did twice.
  I want to count this overlap sequence and summarize as below.
  I wonder I should use pandas, but don't know how to do this.
  If anyone could help this, I would be grateful with that very much.</p>
  
  <p><img src="https://i.stack.imgur.com/tImrQ.jpg" alt="enter image description here"> </p>