Pandas 결측치 포함된 행 제거

Jmnote (토론 | 기여)님의 2021년 7월 31일 (토) 15:55 판 (새 문서: ==개요== ;Pandas 결측치 가진 행 제거 <syntaxhighlight lang='python' notebook> df = pd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'], "toy": [np.nan...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Pandas 결측치 가진 행 제거
df = pd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
                   "toy": [np.nan, 'Batmobile', 'Bullwhip'],
                   "born": [pd.NaT, pd.Timestamp("1940-04-25"),
                            pd.NaT]})
df
df.dropna()

2 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}