728x90
7일차에서 numpy와 pandas 기초를 했다.
오늘은 Pandas 심화 과정을 가져왔다.
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
df = sns.load_dataset('titanic')
print(df.isnull()) # null 값 계산
print(df.isnull().sum()) # null을 각 행마다 수
print(df.info()) # column 당 각각의 수
print(df.shape[0]) # 요소 수
print((df.isnull().sum() / (len(df)) * 100).round(2)) # round(2) : 소수점 2째자리 까지
728x90
'Bootcamp > Pandas & python' 카테고리의 다른 글
[Pandas] numpy & pandas 기초 Command 정리 (0) | 2023.10.10 |
---|---|
[Python] numpy, Pandas 기초 (0) | 2023.10.10 |
[Python] 클래스 (python) (0) | 2023.10.05 |
[Python] 함수 (python) (0) | 2023.10.04 |
[Python] 제어문(if, for, while, try-except) (0) | 2023.09.27 |