Null 값 찾기
이전 연습 문제에서는 두 가지 NULL 데이터 타입인 None과 numpy의 not-a-number 객체 np.nan이 산술 및 논리 연산에서 어떻게 동작하는지 살펴봤어요. 이번 연습에서는 두 타입을 비교하여 그 동작을 더 깊이 이해해 보겠습니다. numpy 패키지는 이미 np로 임포트되어 있어요.
이 연습은 강의의 일부입니다
Python에서 결측치 다루기
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
try:
# Print the comparison of two 'None's
print("'None' comparison output: ", ___)
except TypeError:
# Print if error
print("'None' does not support this operation!!")