반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 데이터전문기관
- cudnn
- inorder
- 대이터
- paragraph
- Keras
- web
- mglearn
- java역사
- postorder
- pycharm
- classification
- KNeighborsClassifier
- C언어
- 웹 용어
- 머신러닝
- CES 2O21 참가
- 자료구조
- tensorflow
- 결합전문기관
- vscode
- html
- bccard
- CES 2O21 참여
- broscoding
- web 개발
- web 용어
- web 사진
- 재귀함수
- discrete_scatter
Archives
- Today
- Total
bro's coding
pandas.데이터 다루기 본문
반응형
data.iloc[:10,[0,3]]
data3=data2[['승차총승객수','하차총승객수']]
data3[:3]
data3.apply(lambda ser: ser.max()-ser.min())
data3.apply(lambda ser: pd.Series([ser.max(),ser.min(),ser.mean(),ser.std()]))
data3.apply(lambda ser: pd.Series([ser.max(),ser.min(),ser.mean(),ser.std()],
index=['max','min','mean','std']))
data3.applymap(lambda x: x//10000)
# = data3//10000
#applymap : 항목 마다
data3.applymap(lambda x: x//10000+np.random.randb())
# !=
data3.applymap//10000+np.random.randn()
# 위에는 각 항목마다 새로운 랜덤수가 출력
# 아래는 하나의 랜덤 수를 사용
Series.apply()
Series.map()
DataFrame.apple() for each column
DataFrame.applymap() for each value
s=pd.Series([1,0,2,4,6,3])
s.map({0:'월',1:'화',2:'수',3:'목',4:'금',5:'토',6:'일'})
data.sort_values('승차총승객수',ascending=False)
반응형
'[IT] > python.pandas' 카테고리의 다른 글
pandas.pivot table (0) | 2020.04.06 |
---|---|
pandas.value_count (0) | 2020.04.06 |
pandas.카테고리 알기 (0) | 2020.04.06 |
pandas.corr, cov(상관 관계) (0) | 2020.04.06 |
pandas.dt(날짜 다루기) (0) | 2020.04.06 |
pandas.basic (0) | 2020.04.06 |
pandas.개념 (0) | 2020.04.03 |
pandas.ndarray 다루기 (0) | 2020.03.26 |
Comments