First select the anchor using the href, then find the six previous td's:
from bs4 import BeautifulSoup
import requests
url = 'http://www.eia.gov/dnav/pet/pet_sum_sndw_dcus_nus_w.htm'
soup = BeautifulSoup(requests.get(url).content,"html.parser")
anchor = soup.select_one("a[href=./hist/LeafHandler.ashx?n=PET&s=W_EPOOXE_YIR_NUS_MBBLD&f=W]")
data = [td.text for td in anchor.find_all_previous("td","DataB", limit=6)]
If we run the code, you can see we get text from the previous six td's:
In [1]: from bs4 import BeautifulSoup
...: import requests
...: url = 'http://www.eia.gov/dnav/pet/pet_sum_sndw_dcus_nus_w.htm'
...: soup = BeautifulSoup(requests.get(url).content,"html.parser")
...: anchor = soup.select_one("a[href=./hist/LeafHandler.ashx?n=PET&s=W_EPOOX
...: E_YIR_NUS_MBBLD&f=W]")
...: data = [td.text for td in anchor.find_all_previous("td","DataB", limit=6
...: )]
...:
In [2]: data
Out[2]: ['934', '919', '957', '951', '928', '139']
That does not quite get there as there as there are two different classes for the td's Current2 and DataB sdo we can use the parent of the anchor which will be a td itself:
In [5]: from bs4 import BeautifulSoup
...: import requests
...: url = 'http://www.eia.gov/dnav/pet/pet_sum_sndw_dcus_nus_w.htm'
...: soup = BeautifulSoup(requests.get(url).content,"html.parser")
...: anchor_td = soup.find("a", href="./hist/LeafHandler.ashx?n=PET&s=W_EPOOXE_Y
...: IR_NUS_MBBLD&f=W").parent
...: data = [td.text for td in anchor_td.find_all_previous("td", limit=6)]
...:
In [6]: data
Out[6]: ['936', '934', '919', '957', '951', '928']
Now we get exactly what we want.
Lastly we could get the grandparent of the anchor i.e the main td then use a select using the the both the class names in our select:
href = "./hist/LeafHandler.ashx?n=PET&s=W_EPOOXE_YIR_NUS_MBBLD&f=W"
grandparent = soup.find("a", href=href).parent.parent
data = [td.text for td in grandparent.select("td.Current2,td.DataB")]
Again data gives us the same output.