pandas.notna() / notnull()

SeungHyun·2023년 8월 24일
0

Pandas

목록 보기
5/6
post-thumbnail

아래 내용은 pandas 2.0.3 버전으로 작성됨.

notna() / notnull() 똑같은 메소드임!

0. 바로 사용하기

DataFrame.notnull()

  • DataFrame 내 요소를 조사하여 결측치일 경우 False 아닐 경우 True인 DataFrame을 반환함.
  • isna(): 결측치면 True
  • notna(): 결측치가 아니면 True


1. 기본형

DataFrame

DataFrame.notna()

Series

Series.notna()

Index

Index.notna()



2. 기능

  • DataFrame/Series/Index 내 요소를 조사하여 결측치가 아닐 경우 True, 맞을 경우 False인 객체 반환함.

공백 및 numpy.inf는 결측치로 보지 않음.
단, pandas.options.mode.use_inf_as_na = True 설정시 numpy.inf를 결측치로 처리함



3. 파라미터

  • 파라미터 없음.


ref

  1. https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.notnull.html
  2. https://pandas.pydata.org/docs/reference/api/pandas.Series.notnull.html
  3. https://pandas.pydata.org/docs/reference/api/pandas.Index.notnull.html
profile
어디로 가야하오

0개의 댓글

관련 채용 정보