text: Q:
  
  I want to separate dates and prices using BeautifulSoup, but they're all under the same td tags
  
  I want to get the nickel price data from http://www.westmetall.com/en/markdaten.php?action=show_table&field=LME_Ni_cash#y2017 by doing webscraping using BeautifulSoup. 
  There are two problems
  1) I would like to separate the price from the dates, putting them on different columns
  2) I want to remove the '.' in the dates
  My code so far is: 
  import bs4 
  import csv
  from urllib.request import urlopen as uReq
  from bs4 import BeautifulSoup as soup
  from datetime import datetime
  
  my_url='http://www.westmetall.com/en/markdaten.php?action=show_table&field=LME_Ni_cash#y2017'
  uClient=uReq(my_url)
  page_html=uClient.read()
  uClient.close()
  page_soup=soup(page_html, "html.parser")
  containers=page_soup.findAll("table")
  contain=containers[0]
  print(contain.td.text)    #I only print this because I want to view the HTML
  
  If I do it this way and apply the loop, it will extract all the elements under td and it will the date and price in 1 column. My goal is to separate them into two columns.
  The preview of the HTML is as follows:
  <tr class="even">
  <td>15. Febuary 2018</td>
  <td>14.150,00</td>
  <td>14.200,00</td>
  <td class="last">339.708</td></tr>
  <tr class="odd">
  <td>14. Febuary 2018</td>
  <td>13.630,00</td>
  <td>13.660,00</td>
  <td class="last">338.652</td>
  </tr>
  
  Thanks so much for the help!!!
  
  A:
  
  This should help.
  import requests
  from bs4 import BeautifulSoup
  
  t = """<table><tr><th>date</th><th class="last">LME Nickel Cash-Settlement</th><th class="last">LME Nickel 3-month</th><th class="last">LME Nickel stock</th></tr><tr class="even"><td>15. Febuary 2018</td><td>14.150,00</td><td>14.200,00</td><td class="last">339.708</td></tr><tr class="odd"><td>14. Febuary 2018</td><td>13.630,00</td><td>13.660,00</td><td class="last">338.652</td></tr><tr class="even"><td>13. Febuary 2018</td><td>13.215,00</td><td>13.255,00</td><td class="last">339.006</td></tr><tr class="odd"><td>12. Febuary 2018</td><td>12.965,00</td><td>13.005,00</td><td class="last">341.160</td></tr><tr class="even"><td>09. Febuary 2018</td><td>12.970,00</td><td>13.000,00</td><td class="last">342.204</td></tr><tr class="odd"><td>08. Febuary 2018</td><td>13.025,00</td><td>13.080,00</td><td class="last">343.896</td></tr><tr class="even"><td>07. Febuary 2018</td><td>13.490,00</td><td>13.500,00</td><td class="last">347.148</td></tr><tr class="odd"><td>06. Febuary 2018</td><td>13.370,00</td><td>13.380,00</td><td class="last">349.476</td></tr><tr class="even"><td>05. Febuary 2018</td><td>13.540,00</td><td>13.585,00</td><td class="last">350.652</td></tr><tr class="odd"><td>02. Febuary 2018</td><td>13.795,00</td><td>13.830,00</td><td class="last">353.592</td></tr><tr class="even"><td>01. Febuary 2018</td><td>13.545,00</td><td>13.555,00</td><td class="last">355.266</td></tr><tr class="shaded"><th>date</th><th class="last">LME Nickel Cash-Settlement</th><th class="last">LME Nickel 3-month</th><th class="last">LME Nickel stock</th></tr><tr class="odd"><td>31. January 2018</td><td>13.555,00</td><td>13.550,00</td><td class="last">357.012</td></tr><tr class="even"><td>30. January 2018</td><td>13.650,00</td><td>13.700,00</td><td class="last">359.292</td></tr><tr class="odd"><td>29. January 2018</td><td>13.890,00</td><td>13.890,00</td><td class="last">360.714</td></tr><tr class="even"><td>26. January 2018</td><td>13.750,00</td><td>13.770,00</td><td class="last">361.782</td></tr><tr class="odd"><td>25. January 2018</td><td>13.695,00</td><td>13.725,00</td><td class="last">362.058</td></tr><tr class="even"><td>24. January 2018</td><td>13.000,00</td><td>13.005,00</td><td class="last">362.196</td></tr><tr class="odd"><td>23. January 2018</td><td>12.750,00</td><td>12.820,00</td><td class="last">362.868</td></tr><tr class="even"><td>22. January 2018</td><td>12.720,00</td><td>12.755,00</td><td class="last">363.168</td></tr><tr class="odd"><td>19. January 2018</td><td>12.595,00</td><td>12.610,00</td><td class="last">361.500</td></tr><tr class="even"><td>18. January 2018</td><td>12.455,00</td><td>12.500,00</td><td class="last">362.532</td></tr><tr class="odd"><td>17. January 2018</td><td>12.415,00</td><td>12.470,00</td><td class="last">364.968</td></tr><tr class="even"><td>16. January 2018</td><td>12.415,00</td><td>12.490,00</td><td class="last">364.218</td></tr><tr class="odd"><td>15. January 2018</td><td>12.835,00</td><td>12.875,00</td><td class="last">364.248</td></tr><tr class="even"><td>12. January 2018</td><td>12.670,00</td><td>12.690,00</td><td class="last">365.994</td></tr><tr class="odd"><td>11. January 2018</td><td>12.835,00</td><td>12.890,00</td><td class="last">368.292</td></tr><tr class="even"><td>10. January 2018</td><td>12.900,00</td><td>12.950,00</td><td class="last">365.868</td></tr><tr class="odd"><td>09. January 2018</td><td>12.515,00</td><td>12.565,00</td><td class="last">367.056</td></tr><tr class="even"><td>08. January 2018</td><td>12.450,00</td><td>12.490,00</td><td class="last">368.430</td></tr><tr class="odd"><td>05. January 2018</td><td>12.500,00</td><td>12.505,00</td><td class="last">365.070</td></tr><tr class="even"><td>04. January 2018</td><td>12.615,00</td><td>12.680,00</td><td class="last">365.934</td></tr><tr class="odd"><td>03. January 2018</td><td>12.465,00</td><td>12.525,00</td><td class="last">366.072</td></tr><tr class="even"><td>02. January 2018</td><td>12.690,00</td><td>12.730,00</td><td class="last">366.612</td></tr></table>"""
  soup = BeautifulSoup(t, "html.parser")
  res = []
  for tr in soup.findAll("table"):
      for td in tr.find_all("tr", class_=["even", "odd"]):
          print td.td.text.replace(".", ""), " = ", td.find('td', class_="last").text
  
  Output:
  15 Febuary 2018  =  339.708
  14 Febuary 2018  =  338.652
  13 Febuary 2018  =  339.006
  12 Febuary 2018  =  341.160
  09 Febuary 2018  =  342.204
  08 Febuary 2018  =  343.896
  07 Febuary 2018  =  347.148
  06 Febuary 2018  =  349.476
  05 Febuary 2018  =  350.652
  02 Febuary 2018  =  353.592
  01 Febuary 2018  =  355.266
  31 January 2018  =  357.012
  30 January 2018  =  359.292
  29 January 2018  =  360.714
  26 January 2018  =  361.782
  25 January 2018  =  362.058
  24 January 2018  =  362.196
  23 January 2018  =  362.868
  22 January 2018  =  363.168
  19 January 2018  =  361.500
  18 January 2018  =  362.532
  17 January 2018  =  364.968
  16 January 2018  =  364.218
  15 January 2018  =  364.248
  12 January 2018  =  365.994
  11 January 2018  =  368.292
  10 January 2018  =  365.868
  09 January 2018  =  367.056
  08 January 2018  =  368.430
  05 January 2018  =  365.070
  04 January 2018  =  365.934
  03 January 2018  =  366.072
  02 January 2018  =  366.612
  
  