I have been using the following script to scrape some data from a website and export to .csv file:
import requests
from bs4 import BeautifulSoup
import pandas as pd
res = requests.get('https://gol.gg/teams/list/season-ALL/split-ALL/tournament-LCS%20Summer%202020/')
soup = BeautifulSoup(res.text, 'html.parser')
table = soup.find("table", class_="table_list playerslist tablesaw trhover")
columns = [i.get_text(strip=True) for i in table.find("thead").find_all("th")]
data = []
table.find("thead").extract()
for tr in table.find_all("tr"):
data.append([td.get_text(strip=True) for td in tr.find_all("td")])
df = pd.DataFrame(data, columns=columns)
df.to_csv("S10-NA-AVGs.csv", index=False)
I am having issues with trying this same script trying to collect other data and export to .csv. The website in question is: https://gol.gg/game/stats/25989/page-fullstats/
I understand that the data is laid out differently in the html code and that is where I am a little mixed up in what it is looking for to grab. It seems to be a where the individual fields are stored so I tried to change this line around:
columns = [i.get_text(strip=True) for i in table.find("thead").find_all("th")]
That is where I am receiving the error message:
AttributeError: 'NoneType' object has no attribute 'find'
I tried changing to "th" and "thead" to a few different variations but was unsuccessful.

tablevariable is undefined. Until now I didn't run your code but in some iteration of your for-loop the vartableis definitly of TypeNone