Q:

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

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now