title: Parsing table horizontally
body: <p>I'm trying to parse this table from an html file, but the output is coming out vertically.</p>
  
  <pre><code>import pandas as pd
  from bs4 import BeautifulSoup
  
  with open("htmltabletest.html", encoding="utf-8") as f:
      data = f.read()
      soup = BeautifulSoup(data, 'lxml')
      trs = soup.findAll('tr')
      for row in trs:
          for nn in row.find_all('td'):
              print(nn.text)
  </code></pre>
  
  <p>content of <code>htmltabletest.html</code></p>
  
  <pre><code>&lt;table class="dataTable st-alternateRows" id="eventSearchTable"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th id="th-es-rb"&gt;&lt;div class="dt-th"&gt; &lt;/div&gt;&lt;/th&gt;
  &lt;th id="th-es-ed"&gt;&lt;div class="dt-th"&gt;&lt;span class="th-divider"&gt; &lt;/span&gt;Event date&lt;br/&gt;Time (local)&lt;/div&gt;&lt;/th&gt;
  &lt;th id="th-es-en"&gt;&lt;div class="dt-th"&gt;&lt;span class="th-divider"&gt; &lt;/span&gt;Event name&lt;br/&gt;Venue&lt;/div&gt;&lt;/th&gt;
  &lt;th id="th-es-ti"&gt;&lt;div class="dt-th"&gt;&lt;span class="th-divider"&gt; &lt;/span&gt;Tickets&lt;br/&gt;listed&lt;/div&gt;&lt;/th&gt;
  &lt;th id="th-es-pr"&gt;&lt;div class="dt-th es-lastCell"&gt;&lt;span class="th-divider"&gt; &lt;/span&gt;Price&lt;br/&gt;range&lt;/div&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody class="" id="eventSearchTbody"&gt;&lt;tr class="even" id="r-se-103577924"&gt;
  &lt;td class="nowrap"&gt;&lt;input class="es-selectedEvent" id="se-103577924-check" name="selectEvent" type="radio"/&gt;&lt;/td&gt;
  &lt;td class="nowrap" id="se-103577924-eventDateTime"&gt;Thu, 10/11/2018&lt;br/&gt;8:20 p.m.&lt;/td&gt;
  &lt;td&gt;&lt;div&gt;&lt;a class="ellip" href="services/priceanalysis?eventId=103577924&amp;amp;sectionId=0" id="se-103577924-eventName" target="_blank"&gt;Philadelphia Eagles at New York Giants&lt;/a&gt;&lt;/div&gt;&lt;div id="se-103577924-venue"&gt;MetLife Stadium, East Rutherford, NJ&lt;/div&gt;&lt;/td&gt;
  &lt;td id="se-103577924-nrTickets"&gt;6655&lt;/td&gt;
  &lt;td class="es-lastCell nowrap" id="se-103577924-priceRange"&gt;&lt;span id="se-103577924-minPrice"&gt;$134.50&lt;/span&gt;  to&lt;br/&gt;&lt;span id="se-103577924-maxPrice"&gt;$2,222.50&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr class="odd" id="r-se-103577925"&gt;
  &lt;td class="nowrap"&gt;&lt;input class="es-selectedEvent" id="se-103577925-check" name="selectEvent" type="radio"/&gt;&lt;/td&gt;
  &lt;td class="nowrap" id="se-103577925-eventDateTime"&gt;Thu, 10/11/2018&lt;br/&gt;8:21 p.m.&lt;/td&gt;
  &lt;td&gt;&lt;div&gt;&lt;a class="ellip" href="services/priceanalysis?eventId=103577925&amp;amp;sectionId=0" id="se-103577925-eventName" target="_blank"&gt;PARKING PASSES ONLY Philadelphia Eagles at New York Giants&lt;/a&gt;&lt;/div&gt;&lt;div id="se-103577925-venue"&gt;MetLife Stadium Parking Lots, East Rutherford, NJ&lt;/div&gt;&lt;/td&gt;
  &lt;td id="se-103577925-nrTickets"&gt;929&lt;/td&gt;
  &lt;td class="es-lastCell nowrap" id="se-103577925-priceRange"&gt;&lt;span id="se-103577925-minPrice"&gt;$20.39&lt;/span&gt;  to&lt;br/&gt;&lt;span id="se-103577925-maxPrice"&gt;$3,602.50&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>When I run the script the output looks like:</p>
  
  <pre><code>Thu, 10/11/20188:20 p.m.
  Philadelphia Eagles at New York GiantsMetLife Stadium, East Rutherford, NJ
  6655
  $134.50  to$2,222.50
  
  Thu, 10/11/20188:21 p.m.
  PARKING PASSES ONLY Philadelphia Eagles at New York GiantsMetLife Stadium Parking Lots, East Rutherford, NJ
  929
  $20.39  to$3,602.50
  </code></pre>
  
  <p>I'm trying to get an output that looks somewhat like this:</p>
  
  <pre><code> Event date                                                             Event name                     Tickets       Price 
  Time (local)                                                            Venue                          Listed        Range
  
  
  Thu, 10/11/20188:20 p.m.   Philadelphia Eagles at New York GiantsMetLife Stadium, East Rutherford, NJ   6655  $134.50  to$2,222.50
  
  Thu, 10/11/20188:21 p.m.   PARKING PASSES ONLY Philadelphia Eagles at New York GiantsMetLife Stadium Parking Lots, East Rutherford, NJ   929   $20.39  to$3,602.50
  </code></pre>
  
  <p>I've been messing around for a day now and I still cant get the output to what I desire, so any help is appreciated!</p>