๐ป Deep Wide Programming (79) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ 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 _____["์ด์ ์ด๋ฆ"] ํ ์ค๋ก๋ ํํ์ด ๊ฐ๋ฅํ๋ค. ๋ค๋ง ()๋ฅผ ์ฌ์ฉํด์ค์ผ ํ๋ค. Data Manipulation with pandas #1-1 Data : DataFrames ์ด์ ๋ฆฌ 1. DataFrames ์ด์ ๋ฆฌ ๋ฐ์ดํฐ์บ ํ์ Data Manipulation with pandas ์ฒซ ๊ฐ์๋, ํ๋ค์ค์ "DATAFRAMES"์ ๋ํ ๋น ๋ฅธ ์ ๋ฐ์ ๋ณต์ต ๋ฐ ์ค๋ฒ๋ทฐ๋ก ์์ํ๋ค. ๊ฐ์ columns ๋ด์๋ ๊ฐ์ data type์ ๊ฐ์ง๋ค. 1-2. DataFrames ์ค์ต (1) Inspecting a DataFrame homelessness.head() ์ด๋ฐ ๋ฐฉ์์ผ๋ก, ์์ชฝ์ ๊ฒ์ฌํ ๋ฐ์ดํฐํ๋ ์์ ์ ๋ชฉ์ ๋ฃ์ด์ค๋ค. ์ด์ 1 2 3 4 5 6 7 8 ยทยทยท 10 ๋ค์