본문 바로가기
개발 Tools/파이썬_Pandas & Numpy

파이썬 Pandas info (요약 정보)

by 전컴반 2023. 2. 23.
반응형
info

 

데이터 프래임의 전체 요약 정보를 알려준다

 

import pandas as pd

df = pd.DataFrame([[0, 1, 2], [3, 4, 5]], index=["r0", "r1"], columns=["c0", "c1", "c2"])
print(df)

출력
    c0  c1  c2
r0   0   1   2
r1   3   4   5

print(df.info())

출력 
<class 'pandas.core.frame.DataFrame'>
Index: 2 entries, r0 to r1
Data columns (total 3 columns):
 #   Column  Non-Null Count  Dtype
---  ------  --------------  -----
 0   c0      2 non-null      int64
 1   c1      2 non-null      int64
 2   c2      2 non-null      int64
dtypes: int64(3)
memory usage: 64.0+ bytes
None

 

반응형

댓글