Dev/Python
[Python] Pandas 데이터 프레임
yujin.me
2021. 7. 7. 22:17
데이터프레임 속성 | |
data.info() | 데이터 정보 확인 |
data.shape | 행과 열의 개수 확인 |
data.columns | 컬럼 정보 확인 |
data.values | 데이터 값 확인 |
data.head(n) | 상위 n개의 행 확인 |
data.tail(n) | 하위 n개의 행 확인 |
data.dropna() | 결측값 제거 |
data.loc[행, 열] | 인덱스 기준으로 행 데이터 읽기 |
data.iloc[n] | 행 번호를 통해 행 데이터 가져오기 |
data.set_index() | 특정 열을 인덱스로 설정할 때 사용 |
data.drop(n) | 특정 row나 column 삭제 |
참고문서
https://pandas.pydata.org/pandas-docs/stable/reference/frame.html
DataFrame — pandas 1.3.0 documentation
Flags Flags refer to attributes of the pandas object. Properties of the dataset (like the date is was recorded, the URL it was accessed from, etc.) should be stored in DataFrame.attrs. Flags(obj, *, allows_duplicate_labels) Flags that apply to pandas obj
pandas.pydata.org
반응형