์ง๋ฌธ์์ด์!
ํด๊ฒฐํ์
จ์ ๊ฑฐ ๊ฐ๊ธดํ๋ฐ, ํน์ ๋์์ด ๋ ๊น ์ถ์ด ๋๊ธ ๋จ๊ฒจ์. ์ ๋ ์นํฌ๋กค๋งํ ๋ค์ df.info๋ก ๋ณด๋ฉด age, number๊ฐ int๊ฐ ์๋๋ผ object๋ก ๋์ค๋๋ผ๊ตฌ์. ๊ทธ๋์ ์ ์นํฌ๋กค๋งํด์ ๋ฐ๋ ์ฝ๋๋ฅผ int()๋ก ๊ฐ์ธ int64๋ก ํํ๋ฅผ ๋ณํ์์ผฐ์ต๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด int64๋ก age ๋ด value ํํ๊ฐ ๋ณํด์ ์ ์๋ฌ๊ฐ ์์ด์ง๊ฒ๋๋ค. ์๋์ ๋ทฐํฐํ์ฒ์ผ๋ก ์ฝ๋ฉํ ๋ด์ฉ ์ค int๋ก ๊ฐ์ผ ๋ด์ฉ๋ง ๋ณต๋ถํ ๊ฒ์~ for i in player_info: a = i.find_all('td') ranking = int(a[0].text) name = a[3].text position = a[4].text age = int(a[5].text) nation = a[6].img['alt'] team = a[7].img['alt'] value = a[8].text.strip() player_list.append([ranking, name, position, age, nation, team, value]) time.sleep(2)