๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๊ต์™ธํ™œ๋™

๋น…๋ฐ์ดํ„ฐ ๋ถ„์„๊ณผ ์‹œ๊ฐํ™”

๋น…๋ฐ์ดํ„ฐ ๋ง›๋ณด๊ธฐ : ์•„๋‚˜์ฝ˜๋‹ค ์„ค์น˜

https://www.anaconda.com/

 

Anaconda | The World's Most Popular Data Science Platform

Anaconda is the standard platform for Python data science, leading in open source innovation for machine learning. Develop, manage, collaborate, and govern at scale with our enterprise platform.

www.anaconda.com

๋น…๋ฐ์ดํ„ฐ ๋ง›๋ณด๊ธฐ : ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ์‚ฌ์šฉ

Programming Language

: Python / C# / HTML / C / Visual Basic / Pascal / Java / JSP / LISP / ASP / C++ Scratch / JavaScript

https://www.tiobe.com/tiobe-index//

 

TIOBE Index | TIOBE - The Software Quality Company

TIOBE Index for August 2019 August Headline: Silly season in the programming language world Nothing much has changed during July in the TIOBE index. In the top 10 only Objective-C and SQL have swapped positions. We need a magnifying glass to see some other

www.tiobe.com

์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ•

-   ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ์‚ฌ์šฉ ์ค‘์—๋Š” ๋ช…๋ น์ฐฝ์„ ์ข…๋ฃŒํ•˜์ง€ ์•Š๋„๋ก ํ•จ

-   ์ƒˆ๋กœ ๋งŒ๋“ค๊ธฐ

: ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์˜ New-Python3 

: Untitled๋ฅผ ์ˆ˜์ •ํ•˜์—ฌ ํŒŒ์ผ ์ด๋ฆ„ ์ง€์ •

-   ์‹คํ–‰ํ•˜๊ธฐ

: ์ƒ๋‹จ์˜ Run ํด๋ฆญ

: Shift + Enter ๋˜๋Š” Ctrl + Enter

-   ์…€ ์ปจํŠธ๋กค

: ์…€์ด๋™ - ํ™”์‚ดํ‘œ

: ์…€์‚ญ์ œ - ๊ฐ€์œ„ (dd)

: ์…€์ถ”๊ฐ€ - +, a ( ์œ„์— ์ถ”๊ฐ€ ), b ( ์•„๋ž˜์— ์ถ”๊ฐ€ )

-   Markdown ๋ชจ๋“œ - m

-   Kernel

: Interrupt

: Restart & Clear output

: Restart & Run All

ํŒŒ์ด์ฌ ๋ณ€์ˆ˜

- ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ

์‹คํ–‰ : Run / Shift + Enter

์‚ญ์ œ, ์ €์žฅ

ํŒŒ์ด์ฌ ์กฐ๊ฑด๋ฌธ _ if else, if elif else

ํŒŒ์ด์ฌ ๋ฐ˜๋ณต๋ฌธ _ for i in range ( ์ดˆ๊ธฐ๊ฐ’, ์ข…๋ฃŒ์กฐ๊ฑด, ์ฆ๊ฐ€๊ฐ’ )

ํŒŒ์ด์ฌ ๋ฆฌ์ŠคํŠธ ( List )

List : ํ•œ๊บผ๋ฒˆ์— ๋งŽ์€ ๊ฐ’์„ ์ €์žฅํ•˜๊ฑฐ๋‚˜ ์ฒ˜๋ฆฌ

๋ฆฌ์ŠคํŠธ ํ•ญ๋ชฉ ๊ฐ’ ๋ณ€๊ฒฝ

๋ฆฌ์ŠคํŠธ ์š”์†Œ ์ถœ๋ ฅ

๋ฆฌ์ŠคํŠธ ์•ˆ์— ํŠน์ • ๊ฐ’์ด ์žˆ๋Š”์ง€ ํ™•์ธ _ if ํ‚ค์›Œ๋“œ in ๋ฆฌ์ŠคํŠธ

๋ฌธ์ž์—ด์„ ๋ฆฌ์ŠคํŠธ๋กœ ๋งŒ๋“ค๊ธฐ _ ๋ฌธ์ž์—ด.split ( ๊ตฌ๋ถ„์ž ) : ๊ณต๋ž€ ํ˜น์€ '๊ตฌ๋ถ„์ž'๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฆฌ์ŠคํŠธ ๋ณ€๊ฒฝ

๋ฆฌ์ŠคํŠธ ๋ฉ”์†Œ๋“œ

 append ( x )

 insert ( i, x )

 extend ( L )

 remove ( x )

 pop ( [ i ] )

 clear ( )

 index [ x [, start [, end ] ] ]

 count ( x )

 sort ( key = None, reverse = False )

 reverse ( )

 copy ( )

ํŒŒ์ด์ฌ ์ž๋ฃŒ๊ตฌ์กฐ _ ๋”•์…”๋„ˆ๋ฆฌ

ํŒŒ์ด์ฌ ํŒŒ์ผ์ฒ˜๋ฆฌ

๋ฐ์ดํ„ฐ ๋ถ„์„์˜ ๊ธฐ๋ณธ : Raw Data -> Cooked Data -> Information

๊ณต๊ณต ๋ฐ์ดํ„ฐ ์‚ฌ์ดํŠธ

https://www.data.go.kr/

 

๊ณต๊ณต๋ฐ์ดํ„ฐํฌํ„ธ

๊ตญ๊ฐ€์—์„œ ๋ณด์œ ํ•˜๊ณ  ์žˆ๋Š” ๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ๋ฅผใ€Ž๊ณต๊ณต๋ฐ์ดํ„ฐ์˜ ์ œ๊ณต ๋ฐ ์ด์šฉ ํ™œ์„ฑํ™”์— ๊ด€ํ•œ ๋ฒ•๋ฅ (์ œ11956ํ˜ธ)ใ€์— ๋”ฐ๋ผ ๊ฐœ๋ฐฉํ•˜์—ฌ ๊ตญ๋ฏผ๋“ค์ด ๋ณด๋‹ค ์‰ฝ๊ณ  ์šฉ์ดํ•˜๊ฒŒ ๊ณต์œ •ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ณต๊ณต๋ฐ์ดํ„ฐ(Dataset)์™€ Open API๋กœ ์ œ๊ณตํ•˜๋Š” ์‚ฌ์ดํŠธ์ž…๋‹ˆ๋‹ค.

www.data.go.kr

https://data.kma.go.kr/cmmn/main.do

 

๊ธฐ์ƒ์ž๋ฃŒ๊ฐœ๋ฐฉํฌํ„ธ

 

data.kma.go.kr

https://www.kaggle.com

 

Kaggle: Your Home for Data Science

 

www.kaggle.com

๊ณต๊ณต๋ฐ์ดํ„ฐ ๋‹ค์šด๋ฐ›๊ธฐ _ ๋น…๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™” ( ํ…์ŠคํŠธ , ์ฐจํŠธ )

CVS ๋ถˆ๋Ÿฌ์˜ค๊ธฐ

# cvs ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ reader ํ•จ์ˆ˜๋กœ ๋ถˆ๋Ÿฌ์˜ค๋ฉด ์•Œ์•„์„œ ,๋กœ ๋ถˆ๋ฆฌํ•ด์˜ด

์ฐจํŠธ ๊ทธ๋ฆฌ๊ธฐ

https://matplotlib.org

 

Matplotlib: Python plotting — Matplotlib 3.1.1 documentation

Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter noteb

matplotlib.org

ํŠน์ • ๋™์˜ ์ธ๊ตฌ์ˆ˜ ๊ทธ๋ž˜ํ”„๋กœ ๊ทธ๋ฆฌ๊ธฐ

-   ์ธ๊ตฌ์ˆ˜๊ฐ€ ๋งŽ์•„์„œ ์—๋Ÿฌ ๋œจ๋ฉด temp.append(int(r[i])) ๋Œ€์‹  temp.append(int(r[i].replace(',',''))) ์จ์ฃผ๋ฉด ๋จ

replace(',','') : ์ˆซ์ž ์‚ฌ์ด์— ์žˆ๋Š” : ๋ฅผ ๊ณต๋ฐฑ์œผ๋กœ ๋ฐ”๊ฟ”์ค€๋‹ค

2๊ฐœ์˜ ๋™ ์ธ๊ตฌ์ˆ˜ ๊ทธ๋ž˜ํ”„ ๋น„๊ต

์ง€๋„๊ทธ๋ฆฌ๊ธฐ : forlium

https://python-graph-gallery.com/288-map-background-with-folium

 

#288 Map background with folium

Folium is a python library allowing to call the Leaflet.js Javascript library. It allows you to manipulate your data with python and map them using the power of leaflet! It is really easy to call a…

python-graph-gallery.com

-   ์„ค์น˜ํ•˜๊ธฐ : pip install folium / conda install folium

-   ๊ตฌ๊ธ€๋งต์— ๊ฐ€์„œ ์›ํ•˜๋Š” ์œ„๋„ ๊ฒฝ๋„ ์ฐพ์•„์˜ค๊ธฐ

https://www.google.co.kr/maps

 

Google Maps

Find local businesses, view maps and get driving directions in Google Maps.

www.google.co.kr

์ง€๋„์— Marker ํ‘œ์‹œํ•˜๊ธฐ : folium

https://python-graph-gallery.com/312-add-markers-on-folium-map/

์ง€๋„์— Marker ํ‘œ์‹œํ•˜๊ธฐ : folium

 

csv ๋ฐ์ดํ„ฐ ํ™•์ธํ•˜์—ฌ ์ž๋™์œผ๋กœ ๋งˆ์ปค ํ‘œ์‹œ

๋น…๋ฐ์ดํ„ฐ ๋ถ„์„ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ : pandas

https://pandas.pydata.org/

 

Python Data Analysis Library — pandas: Python Data Analysis Library

Python Data Analysis Library pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. pandas is a NumFOCUS sponsored project. This will help ensure t

pandas.pydata.org

https://dataitgirls2.github.io/10minutes2pandas/

 

ํŒ๋‹ค์Šค 10๋ถ„ ์™„์„ฑ / 10 Minutes to Pandas

Pandas 10๋ถ„ ์™„์„ฑ ์—ญ์ž ์ฃผ : ๋ณธ ์ž๋ฃŒ๋Š” 10 Minutes to Pandas (ํ•˜๋‹จ ์›๋ฌธ ๋งํฌ ์ฐธ์กฐ)์˜ ํ•œ๊ธ€ ๋ฒˆ์—ญ ์ž๋ฃŒ๋กœ, ๋ฒˆ์—ญ์€ ๋ฐ์ž‡๊ฑธ์ฆˆ2 ํ”„๋กœ๊ทธ๋žจ ๊ต์œก์ƒ ๋ชจ๋‘๊ฐ€ ํ•จ๊ป˜ ์ง„ํ–‰ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋ฐ์ž‡๊ฑธ์ฆˆ2๋Š” ๊ณผํ•™๊ธฐ์ˆ ์ •๋ณดํ†ต์‹ ๋ถ€์™€ ํ•œ๊ตญ์ •๋ณดํ™”์ง„ํฅ์›์ด ์ฃผ๊ด€ํ•˜๋Š” SW์—ฌ์„ฑ์ธ์žฌ ๋น…๋ฐ์ดํ„ฐ ๋ถ„์„ ๊ต์œก๊ณผ์ •์œผ๋กœ, ์ƒ์„ธํ•œ ์†Œ๊ฐœ๋Š” ํŽ˜์ด์Šค๋ถ ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐ ๋ถ€ํƒ ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๋ณธ ์ž๋ฃŒ์˜ ์ €์ž‘๊ถŒ์€ BSD-3-Clause์ธ ์ ์„ ์ฐธ์กฐํ•˜์—ฌ ์ฃผ์„ธ์š”. This documentation is a

dataitgirls2.github.io

๋ฐ์ดํ„ฐ ๋ถ„์„ํ•˜๊ธฐ

1. ๊ณต๊ณต๋ฐ์ดํ„ฐ ์‚ดํŽด๋ณด๊ธฐ

2. ์ ๋‹นํ•œ ๋ฐ์ดํ„ฐ ์„ ์ •ํ•˜๊ธฐ

3. ๋ถ„์„ํ•  ๋‚ด์šฉ ์ •ํ•˜๊ธฐ

4. ํ…์ŠคํŠธ๋‚˜ ์ฐจํŠธ๋กœ ์‹œ๊ฐํ™”ํ•ด๋ณด๊ธฐ

5. ์ง€๋„๋กœ ์‹œ๊ฐํ™”ํ•˜๊ธฐ

6. ์ถœ๋ ฅํ•˜์—ฌ ๋ฐœํ‘œํ•˜๊ธฐ