250x250
Link
๋์ GitHub Contribution ๊ทธ๋ํ
Loading data ...
Notice
Recent Posts
Recent Comments
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- pandas
- ADsP
- ๋์ํ๋ณธ
- ํ ์คํธ๋ถ์
- ์ธ๋์ํ๋ง
- ๋น ๋ฐ์ดํฐ
- Python
- ์๋ํด๋ผ์ฐ๋
- ์ค๋ฒ์ํ๋ง
- ๋ฐ์ดํฐ๋ถ์
- DBSCAN
- numpy
- datascience
- t-test
- LDA
- ๋ฐ์ดํฐ๋ถ์์ค์ ๋ฌธ๊ฐ
- iloc
- ADP
- ํฌ๋กค๋ง
- ๋ฐ์ดํฐ๋ถ์์ ๋ฌธ๊ฐ
- ๊ตฐ์งํ
- opencv
- Lambda
- ๋ฐ์ดํฐ๋ถ๊ท ํ
- ๋น ๋ฐ์ดํฐ๋ถ์๊ธฐ์ฌ
- PCA
- ๋ ๋ฆฝํ๋ณธ
- dataframe
- ์ฃผ์ฑ๋ถ๋ถ์
- ํ์ด์ฌ
Archives
Data Science LAB
[Python] Pandas๋ฅผ ์ด์ฉํ ์๊ฐํ ๋ณธ๋ฌธ
728x90
import pandas as pd
np.random.seed(0)
df1 = pd.DataFrame(np.random.randn(100,3),
index=pd.date_range('1/1/2018', periods=100),
columns=['A',"B","C"]).cumsum()
df1.tail()
f1.plot()
plt.title('Pandas์ Plot ๋ฉ์๋ ์ฌ์ฉ ์')
plt.xlabel('์๊ฐ')
plt.ylabel('Data')
plt.show()
iris = sns.load_dataset('iris')
titanic = sns.load_dataset('titanic')
iris.sepal_length[:20].plot(kind='bar', rot=0)
plt.title('๊ฝ๋ฐ์นจ์ ๊ธธ์ด ์๊ฐํ')
plt.xlabel('data')
plt.ylabel('๊ฝ๋ฐ์นจ์ ๊ธธ์ด')
plt.show()
iris[:5].plot.bar(rot=0)
plt.title('Iris ๋ฐ์ดํฐ์ Bar Plot')
plt.xlabel('Data')
plt.ylabel('๊ฐ Feature ๊ฐ')
plt.ylim(0,7)
plt.show()
# ๊ฐ ๋ถ๊ฝ์ข
์ ํน์ง๊ฐ์ ํ๊ท
df2 = iris.groupby(iris.species).mean()
df2.columns.name='feature'
df2
df2.plot.bar(rot=0)
plt.title('๊ฐ ์ข
์ Feature๋ณ ํ๊ท ')
plt.xlabel('ํ๊ท ')
plt.ylabel('์ข
')
plt.ylim(0,8)
plt.show()
# ์ ์น์ฐ์ฐ์ผ๋ก ์๊ฐํ๋ฐฉ๋ฒ์ ๋ค๋ฅด๊ฒ ํํ
df2.T.plot.bar(rot=0)
plt.title('๊ฐ Feature์ ์ข
๋ณ ํ๊ท ')
plt.xlabel('Feature')
plt.ylabel('ํ๊ท ')
plt.show()
df3 = titanic.pclass.value_counts()
df3.plot.pie(autopct='%.2f%%')
plt.title('์ ์ค๋ณ ์น๊ฐ ์ ๋น์จ')
plt.axis('equal')
plt.show()
iris.plot.hist()
plt.title('๊ฐ Feature ๊ฐ๋ค์ ๋น๋์ Histogram')
plt.xlabel('๋ฐ์ดํฐ ๊ฐ')
plt.show()
iris.plot.box()
plt.title('๊ฐ Feature ๊ฐ๋ค์ ๋น๋์์ ๋ํ Box Plot')
plt.xlabel('Feature')
plt.ylabel('๋ฐ์ดํฐ ๊ฐ')
plt.show()
728x90
'๐ Python > ์๊ฐํ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Python] Matplotlib ์๊ฐํ (0) | 2022.09.22 |
---|---|
[Python] Mac์์ Matplotlib ํ๊ธ ๊นจ์ง ํ์ ํด๊ฒฐ ๋ฐฉ๋ฒ (0) | 2022.09.20 |
[Python] matplotlib ํ๊ธ ๊นจ์ง ๋ฐฉ์ง, ํ๊ธ ์ถ๋ ฅ ๋ฐฉ๋ฒ (0) | 2022.08.26 |
[Python] matplotlib subplots ์ฌ์ฉ(์ฌ๋ฌ๊ฐ์ ๊ทธ๋ํ๋ฅผ ํ๋ฒ์) (0) | 2022.08.23 |
Comments