๐๏ธ์ํํธ์จ์ด/๐ปpython
python ์ฝ๋ ํ ์ค์ ์ฌ๋ฌ ์ค๋ก ์ฐ๊ธฐ, ์ค ๋๊ฒจ์ ์์ฑํ๊ธฐ
๋ฌธ์ฅ ์๋ค์ ''' ''' ์์๋ฐ์ดํ 3๊ฐ๋ฅผ ์ฐ๋ฌ์ ๋ถ์ด๋๋ก ํ๋ค
ํ์ด์ ์ธ๋ฑ์ฑ(index)๊ณผ ์ฌ๋ผ์ด์ฑ(slice) 1
1. ์ธ๋ฑ์ฑ๊ณผ ์ฌ๋ผ์ด์ฑ (INDEXING , SLICING) ํน์ ์์น์ ๊ธ์๋ฅผ ๋ณด๊ณ ์ถ์๋, ์ถ๋ ฅ ๋ฐฉ๋ฒ๊ณผ ๋ณ์ ์ด๋ฆ์ ๋ํ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ๋ค ๋ณ์ str ์ ๋ฌธ์์ด์ ๋ค์๊ณผ ๊ฐ์ด ๋ฃ์ด์ค๋ค ๊ทธ๋ฆฌ๊ณ ์ธ๋ฑ์ฑ ํ๊ธฐ ์ํด์๋ ๋๊ดํธ(square brackets) ์ ์ฌ์ฉํ๋ค [ ] ํน์ ์์น ๊ฐ์ ์ธ๋ฑ์ฑ์ ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ ์ ์๋ค ์ฐจ๋ก๋๋ก
Python ์นํฌ๋กค๋ง
# request ๋ผ์ด๋ธ๋ฌ๋ฆฌ , ์ํ๋ ํ์ด์ง์ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ import requests as req res =req.get("http://www.naver.com") # : success / : ์คํจ๋จ res # ํ ์คํธ๋ก ๋ด์ฉ์ ํํํ๋๋ฐ, '~~~' ์ ์ฒด ๋ฐ์ดํฐ๊ฐ ํ๋์ ๋ค์ด๊ฐ ์๋ค. res.text # Melon ์ฌ์ดํธ์ ์ ๋ณด๋ฅผ ๋ฐ์์ค๊ธฐ req.get("https://www.melon.com/") # ์ฌ์ดํธ ์ ๊ทผ ์คํจ์, ์ฌ๋์ด ์ ๊ทผํ ๊ฒ ์ฒ๋ผ ์์ด๋ ์์ header ์์ ์ ํด์ผํ๋ค. # f12 > network > document ํ์ ์์ "user-agent" ๋ฅผ ์ฐพ๋๋ค. head = {"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x..
[1์ฐจ ํ๋ก์ ํธ ์ค๋น] ํ์ด์ ์ผ๋ก DB ๊ตฌ์ถ ๊ฐ๋ฅ์ฑ
https://yurimkoo.github.io/python/2019/09/14/connect-db-with-python.html ์ ๋ฆผ's Blog ๋ฒ ์งฑ์ด๊ฐ ๋๊ณ ์ถ์ ๊ฐ๋ฏธ์ ๊ธฐ์ ๋ธ๋ก๊ทธ yurimkoo.github.io DB ๊ตฌ์ฑ์์ ๋ค์๊ณผ ๊ฐ์ ํ๋ ์์ ๋ฐ๋ผ ๊ตฌ์ฑํด๋ณด๊ธฐ Needed Task 1 DB ์ค๊ณ๋ master / ๊ด๋ฆฌ์ ์ ์ฅ ์ ์ฒด ๊ฐ๋ต๋ ๊ตฌ์ถ 2 PMK primary key ์ค์ 3 DB ํ ์ด๋ธ ๋ง๋ค๊ธฐ https://www.youtube.com/watch?v=_PLnqIV2m3k&ab_channel=%EC%86%8C%EB%86%80%EC%BD%94%EB%94%A9_SonolCoding 4 DBMS ์ข ๋ฅ ์ ์ mysql, mariadb, sqllite3 etc 5 DB ์ฐ๋(ํต์ฌ) https:..
ํ์ด์ ๊ณต๋ถํ๋ ๋ฐฉ๋ฒ
https://www.kaggle.com/learn Learn Python, Data Viz, Pandas & More | Tutorials | Kaggle Practical data skills you can apply immediately: that's what you'll learn in these free micro-courses. They're the fastest (and most fun) way to become a data scientist or improve your current skills. www.kaggle.com ์ฌ์ฌํ๋ฐ, ๊ฒ์ํ๋ฏ์ด ํ ์ ์์ด ์ข๋ค.