๐ ์ค๋ ํ ์ผ ๐
์์ ์์ ์ ๋ณด ๋ฐ์ดํฐ์์ ๋ด๊ฐ ํ์ํ ์ ๋ณด๋ง ๋จ๊ฒจ๋์ !
๐์ฌ์ฉํ ๋ฐ์ดํฐ ๐
์ ๊ตญํตํฉ์ํ์์์ฑ๋ถ์ ๋ณด(์์)ํ์ค๋ฐ์ดํฐ
๐ญ ์ํ์ฐฉ์ค๋ค....
โฌ๏ธโฌ๏ธโฌ๏ธโฌ๏ธโฌ๏ธโฌ๏ธ
โ csv ํ์ผ์ด ์๋ถ๋ฌ์์ ธ์
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbd in position 0: invalid start byte

ํด๊ฒฐ ๋ฐฉ๋ฒ : encoding='cp949' ์ถ๊ฐํ๊ธฐ

โ tensorflow ์ค์น๊ฐ ์๋ผ์
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\alsrud\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\tensorflow\\include\\external\\com_github_grpc_grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.h' HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths
ํด๊ฒฐ ๋ฐฉ๋ฒ : ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก powershell ์คํ ํ long path behavior ํ์ฑํ (์๋ ๋ช ๋ น ์ ๋ ฅ)
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force


๐ฎ ์ผ๋จ ์๋ฃ .. !

โ๏ธ ์ ์ฒด ์ฝ๋
import pandas as pd
# ๋ฐ์ดํฐ ๋ถ๋ฌ์ค๊ธฐ
data = pd.read_csv('food_nutritional_info.csv', encoding='cp949')
# ์ํ๋ ๋ฐ์ดํฐ๋ก ๊ฐ์ถ๋ฆฌ๊ธฐ
selected_data = data[['์ํ๋ช
', '์ํ๋๋ถ๋ฅ๋ช
', '๋ํ์ํ๋ช
', '์์์ฑ๋ถํจ๋๊ธฐ์ค๋', '์๋์ง(kcal)', 'ํ์ํ๋ฌผ(g)', '๋จ๋ฐฑ์ง(g)', '์ง๋ฐฉ(g)', '๋น๋ฅ(g)']]
selected_data = selected_data.fillna(0)
print(selected_data)