Write a Python program to get the number of observations, missing values and nan values

  • ذكاء صنعي
  • برمجة بايثون

Write a Python program to get the number of observations, missing values and nan values.

الأجوبة

import pandas as pd
iris = pd.read_csv("iris.csv")
print(iris.info())

Samole Output:

<class 'pandas.core.frame.dataframe'="">
RangeIndex: 150 entries, 0 to 149
Data columns (total 6 columns):
Id               150 non-null int64
SepalLengthCm    150 non-null float64
SepalWidthCm     150 non-null float64
PetalLengthCm    150 non-null float64
PetalWidthCm     150 non-null float64
Species          150 non-null object
dtypes: float64(4), int64(1), object(1)
memory usage: 7.1+ KB
None
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...