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

๋ฐ˜์‘ํ˜•

๐Ÿ’ป Deep Wide Programming/Python

(17)
[ํŒŒ์ด์ฌ] ํŒŒ์ด์ฌ ํด๋ž˜์Šค ์ดํ•ดํ•˜๊ธฐ ๐Ÿ“Œ์ ํ”„ ํˆฌ ํŒŒ์ด์ฌ_ ํด๋ž˜์Šค ์Šคํ„ฐ๋”” ๋ชฉ์ฐจ ์ ํ”„ ํˆฌ ํŒŒ์ด์ฌ ํด๋ž˜์Šค : ์ดˆ๋ณด ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ, ํด๋ž˜์Šค์˜ ๊ฐœ๋… A-Z, ๊ธฐ์ดˆ๋ถ€ํ„ฐ ์ฐจ๊ทผ์ฐจ๊ทผ! ํด๋ž˜์Šค๋Š” ์™œ ํ•„์š”ํ•œ๊ฐ€? ํด๋ž˜์Šค์™€ ๊ฐ์ฒด ์‚ฌ์น™์—ฐ์‚ฐ ํด๋ž˜์Šค ๋งŒ๋“ค๊ธฐ ํด๋ž˜์Šค๋ฅผ ์–ด๋–ป๊ฒŒ ๋งŒ๋“ค์ง€ ๋จผ์ € ๊ตฌ์ƒํ•˜๊ธฐ ํด๋ž˜์Šค ๊ตฌ์กฐ ๋งŒ๋“ค๊ธฐ ๊ฐ์ฒด์— ์ˆซ์ž ์ง€์ •ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ค๊ธฐ ๋”ํ•˜๊ธฐ ๊ธฐ๋Šฅ ๋งŒ๋“ค๊ธฐ ๊ณฑํ•˜๊ธฐ, ๋นผ๊ธฐ, ๋‚˜๋ˆ„๊ธฐ ๊ธฐ๋Šฅ ๋งŒ๋“ค๊ธฐ ์ƒ์„ฑ์ž (Constructor) ํด๋ž˜์Šค์˜ ์ƒ์† ๋ฉ”์„œ๋“œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ ํด๋ž˜์Šค ๋ณ€์ˆ˜ ๐Ÿ“Œํด๋ž˜์Šค์™€ ๊ฐ์ฒด โœ๏ธํด๋ž˜์Šค์™€ ๊ฐ์ฒด์˜ ๊ฐœ๋…: ๊ณผ์ž ํ‹€๊ณผ ํ‹€์— ์˜ํ•ด ๋งŒ๋“ค์–ด์ง„ ๊ณผ์ž โœ๏ธํด๋ž˜์Šค๋ฅผ ์–ด๋–ป๊ฒŒ ๋งŒ๋“ค๊ธฐ ๋จผ์ € ๊ตฌ์ƒํ•˜๊ธฐ ํด๋ž˜์Šค๋Š” ๋ฌด์ž‘์ • ๋งŒ๋“œ๋Š” ๊ฒƒ๋ณด๋‹ค ํด๋ž˜์Šค๋กœ ๋งŒ๋“  ๊ฐ์ฒด๋ฅผ ์ค‘์‹ฌ์œผ๋กœ ์–ด๋–ค ์‹์œผ๋กœ ๋™์ž‘ํ•˜๊ฒŒ ํ•  ๊ฒƒ์ธ์ง€ ๋ฏธ๋ฆฌ ๊ตฌ์ƒํ•œ ํ›„์— ์ƒ๊ฐํ•œ ๊ฒƒ๋“ค์„ ํ•˜๋‚˜์”ฉ ํ•ด๊ฒฐํ•ด๊ฐ€๋ฉด์„œ ์™„์„ฑํ•ด๋‚˜๊ฐ€๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. ๐Ÿ“Œ๋” ..
matplotlib markers/annotation/visualization(๋‹ค์–‘ํ•œ figures/3d ๊ทธ๋ž˜ํ”„, etc. ํ™œ์šฉ์‹œ ์ฐธ์กฐ links https://matplotlib.org/3.1.1/api/markers_api.html matplotlib.markers — Matplotlib 3.1.2 documentation matplotlib.markers This module contains functions to handle markers. Used by both the marker functionality of plot and scatter. All possible markers are defined here: marker symbol description "." point "," pixel "o" circle "v" triangle_down "^" triangle_u matplotlib.org https://matplotlib.org/3..
[Pandas] DataFrame์˜ Inner Join, Outer Join, Left Join, Right Join/concat/melt์— ๊ด€ํ•œ ์ข‹์€ ์ •๋ฆฌ ๊ธ€ Datacamp์—์„œ ํŒ๋‹ค์Šค join์— ๊ด€ํ•œ ํŒŒํŠธ๋ฅผ ๊ณต๋ถ€ํ•˜๋ฉฐ, ๋ช…์พŒํ•˜์ง€ ์•Š์€ ๊ตฌ์„๋“ค์ด ์žˆ์—ˆ๋Š”๋ฐ ์ฐพ์•„๋ณด๋‹ค๊ฐ€, ์Šฅ ํ›‘์–ด๋ณด๋ฉด ์ •๋ฆฌํ•˜๊ธฐ ์ข‹์€ ๊ธ€๋“ค์„ ๋ฆฌ์ŠคํŒ…ํ•ด๋ณธ๋‹ค. ์œ„์—์„œ๋ถ€ํ„ฐ ์ˆœ์„œ๋Œ€๋กœ ๋ณด๋ฉด ๋Œ€๋žต ๊ฐ ์žก๋Š”๋ฐ ๋„์›€์ด ๋œ๋‹ค. ๋‚˜์ค‘์— ๋˜ ๋ณต์Šตํ•  ๋•Œ ์ฐธ๊ณ ํ•ด์•ผ์ง€ http://www.gisdeveloper.co.kr/?p=8255 pandas์˜ DataFrame์— ๋Œ€ํ•œ Inner Join, Outer Join, Left Join, Right Join – GIS Developer ํŒ๋‹ค์Šค์—์„œ ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„์€ ํ…Œ์ด๋ธ” ํ˜•์‹์˜ ๋ฐ์ดํ„ฐ์…‹์ž…๋‹ˆ๋‹ค. DBMS์˜ Table๋“ค ๊ฐ„์—๋„ Join์„ ๋งบ์„ ์ˆ˜ ์žˆ๋“ฏ์ด, ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํŒ๋‹ค์Šค์˜ ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„๋“ค ๊ฐ„์—๋„ Join์„ ๋งบ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌผ๋ก  Join์„ ๋งบ์„ ๏ฟฝ๏ฟฝ www.gisdeveloper.co.kr..
[Datacamp/Pandas]layering plots,add legned,transparency, missing values, creating dataframe ๐Ÿ“Œ ๋‘๊ฐœ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฒน์ณ์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ๐Ÿ“Œ ๊ฒฐ์ธก์น˜ ํ™•์ธํ•˜๊ธฐ ๐Ÿ“Œ ๊ฒฐ์ธก์น˜ ์ฒ˜๋ฆฌํ•˜๊ธฐ 1)์ œ๊ฑฐํ•˜๊ธฐ 2)๊ต์ฒดํ•˜๊ธฐ ๐Ÿ“Œ ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„ ๋งŒ๋“ค๊ธฐ 1)Row์˜ ํ˜•ํƒœ๋กœ ๋งŒ๋“ค๊ธฐ, 2) Column์˜ ํ˜•ํƒœ๋กœ ๋งŒ๋“ค๊ธฐ pd.DataFrame(๋ฆฌ์ŠคํŠธ๋„ค์ž„)
Anaconda_Jupyter Notebook ์•„๋‚˜์ฝ˜๋‹ค๋กœ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ์‚ฌ์šฉํ•˜๊ธฐ(feat. ๋งˆํฌ๋‹ค์šดMarkdown ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•) ์•„๋‚˜์ฝ˜๋‹ค๋ž€์™€ ์ฃผํ”ผํ„ฐ๋…ธํŠธ๋ถ ์‰ฝ๊ฒŒ ๋งํ•ด ํŒŒ์ด์ฌ๊ณผ ๊ด€๋ จ๋œ ๋‹ค์–‘ํ•œ ์ƒํƒœ๊ณ„๋ฅผ '์•„๋‚˜์ฝ˜๋‹ค'์ฒ˜๋Ÿผ ์ง‘์–ด์‚ผํ‚ค๊ณ  ์žˆ๋Š” ๊ฒƒ์ด๋ผ ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค. ์•„๋‚˜์ฝ˜๋‹ค๋ฅผ ์„ค์น˜ํ•˜๋ฉด, ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์ด ์ž๋™์œผ๋กœ ์„ค์น˜๋œ๋‹ค. ํŒŒ์ด์ฌ์„ ์šฐ๋ฆฌ๊ฐ€ ์ด์šฉํ•  ๋•Œ ์ฝ˜์†”์— ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ์•„์›ƒํ’‹์ด ์ถœ๋ ฅ๋˜๋Š”๋ฐ, ๊ทธ๊ฑธ ์›น์—์„œ ๋ณผ ์ˆ˜ ์žˆ์–ด์„œ ๋ฌธ์„œํ™”๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค. ํ„ฐ๋ฏธ๋„์—์„œ pip ๊ด€๋ จ ์˜ค๋ฅ˜๊ฐ€ ๋– ์„œ, ํ•œ์ฐธ์„ ๋ชป ์—ด๋‹ค๊ฐ€ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ ์ ‘์†ํ–ˆ๋‹ค. ์•„๋‚˜์ฝ˜๋‹ค ๋„ค๋น„๊ฒŒ์ดํ„ฐ๋ฅผ ์ฐพ์•„์„œ ๋ˆ„๋ฅด๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์—ด๋ฆฐ๋‹ค. jupyter notebook ํ•˜๋‹จ์˜ Launch๋ฅผ ๋ˆ„๋ฅด๋ฉด, ์•Œ์•„์„œ terminal์„ ํ†ตํ•ด ์›น ์ƒ์— jupyter notebook์ด ์—ด๋ฆฐ๋‹ค. ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๋งˆํฌ๋‹ค์šด ์‚ฌ์šฉํ•˜๊ธฐ ํŒŒ์ผ์„ ํ•˜๋‚˜ ๋งŒ๋“ค์–ด, ๊ฐ„๋‹จํ•œ ๋งˆํฌ๋‹ค์šด ์‚ฌ์šฉ๋ฒ•์„ ์ •๋ฆฌํ–ˆ๋‹ค. [๋งˆํฌ๋‹ค์šด ์‚ฌ์šฉTip] # ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ์‚ฌ..
Data Manipulation with pandas #2 Aggregating Data_ Statistics, Counting, Grouped summary statistics, Pivot Table @Datacamp 1) Statistics ์—ฐ์Šต/์‹ค์Šต 2) Counting ์นด์šดํŒ… ํ•˜๊ธฐ ์ „์—, ์ •๋ ฌ์„ ์ข€ ํ•  ํ•„์š”๊ฐ€ ์žˆ๋‹ค. Dropping duplicates ์นด์šดํŒ…ํ•˜๊ธฐ .value_counts() ๋น„์œจํ™˜์‚ฐ .value_counts(normalize=True) Counting ์—ฐ์Šต๋ฌธ์ œ/์‹ค์Šต 3) Grouped summary statistics ์—ฐ์Šต/์‹ค์Šต 4) Pivot Table addfunc
Data Manipulation with pandas #1-3 New columns ์ด์ •๋ฆฌ ๊ฐœ๋…์ •๋ฆฌ ์œ„์˜ ๋‚ด์šฉ ์‘์šฉํ•˜๊ธฐ
Data Manipulation with pandas #1-2 Sorting and subsetting ์ด์ •๋ฆฌ 1. Sorting(์ •๋ ฌ) and subsetting(๋ถ€๋ถ„์ง‘ํ•ฉ) ์ด์ •๋ฆฌ Subsetting Columns _____["์—ด์˜ ์ด๋ฆ„"] ํ•œ ์ค„๋กœ๋„ ํ‘œํ˜„์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ๋‹ค๋งŒ ()๋ฅผ ์‚ฌ์šฉํ•ด์ค˜์•ผ ํ•œ๋‹ค.

728x90
๋ฐ˜์‘ํ˜•