title: Python Read Specific Data from Text File
body: <p>I'm struggling with trying to grasp this. I need to create a pandas DataFrame object with the following entries for each review:</p>
  
  <ul>
  <li>Product ID</li>
  <li>Number of people who voted this review helpful</li>
  <li>Total number of people who rated this review</li>
  <li>Rating of the product</li>
  <li>Text of the review</li>
  </ul>
  
  <p>If anyone can even just help me get started on how to print every product/productID line, that would be appreciated.</p>
  
  <p>Here's a sample of my text file: (sorry I don't know how to properly format it when I enter it on this site)</p>
  
  <pre><code>product/productId: B001E4KFG0
  review/userId: A3SGXH7AUHU8GW
  review/profileName: delmartian
  review/helpfulness: 1/1
  review/score: 5.0
  review/time: 1303862400
  review/summary: Good Quality Dog Food
  review/text: I have bought several of the Vitality canned dog food products and have found them all to be of good quality. The product looks more like a stew than a processed meat and it smells better. My Labrador is finicky and she appreciates this product better than  most.
  
  product/productId: B00813GRG4
  review/userId: A1D87F6ZCVE5NK
  review/profileName: dll pa
  review/helpfulness: 0/0
  review/score: 1.0
  review/time: 1346976000
  review/summary: Not as Advertised
  review/text: Product arrived labeled as Jumbo Salted Peanuts...the peanuts were actually small sized unsalted. Not sure if this was an error or if the vendor intended to represent the product as "Jumbo".
  
  product/productId: B000LQOCH0
  review/userId: ABXLMWJIXXAIN
  review/profileName: Natalia Corres "Natalia Corres"
  review/helpfulness: 1/1
  review/score: 4.0
  review/time: 1219017600
  review/summary: "Delight" says it all
  review/text: This is a confection that has been around a few centuries.  It is a light, pillowy citrus gelatin with nuts - in this case Filberts. And it is cut into tiny squares and then liberally coated with powdered sugar.  And it is a tiny mouthful of heaven.  Not too chewy, and very flavorful.  I highly recommend this yummy treat.  If you are familiar with the story of C.S. Lewis' "The Lion, The Witch, and The Wardrobe" - this is the treat that seduces Edmund into selling out his Brother and Sisters to the Witch.
  </code></pre>