일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- box-sizing
- 알고리즘
- 확률
- skt membership
- Codility
- 수학
- 상태
- transform
- 미디어 쿼리
- spring
- 강화학습
- 반응형 웹
- grid
- Photoshop
- 백준
- Gap
- stl
- c
- 포토샵
- react
- 통신사할인
- float
- Prefix Sums
- pandas
- 소수
- SK바이오사이언스
- c++
- REM
- Javascript
- CSS
Archives
- Today
- Total
sliver__
[Pandas] API 정리 본문
728x90
Function | Function | Description |
pd.Series(data, index = idx) | 1D Series data 생성 data는 ndarray, dictionary, scaler value index는 없는 경우 [0,...,n-1] |
|
Series.index | Series 객체 index 반환 | |
Series.get(key, value) | Series 객체의 key 값이 있으면 대응되는 값 return 없는 경우 value return |
|
Series[Series > X] | stockPriceSeries[stockPriceSeries > 100] | Series 객체 중 X 값 이 상인 데이터 추출 |
pd.DataFrame(data, index, columns) | 2D DataFrame 생성 data는 dictionary, series, tabular, 2D numpy array index, columns 지정 가능 |
|
pd.DataFrame.from_dict(data, orient = "colums" or "index", colunms) | orient 기준으로 dataframe 생성 | |
pd.DataFrame.from_records(data, index) | data를 index 지정하여 생성 | |
DataFrame[colums] = X or list | DataFrame column에 데이터 설정 | |
DataFrame.insert(index, col_name, list) | column index에 list 데이터를 열 방향으로 추가 | |
del DataFrame[colunms] | column 삭제 | |
DataFrame.pop(column) | column 삭제 |
728x90
'CS > Pandas' 카테고리의 다른 글
[Numpy] API 정리 (0) | 2023.07.02 |
---|---|
[Pandas 기초] 통계 함수 적용 (0) | 2022.03.07 |
[Pandas 기초] 데이터프레임 구조 (0) | 2022.03.06 |
[Pandas 기초] 데이터 저장하기 (0) | 2022.03.05 |
[Pandas 기초] 외부 파일 읽어오기 (0) | 2022.03.05 |
Comments