1. Download the heights and weights dataset and load the dataset from a given csv file into a dataframe. Print the first, last 10 rows and random 20 rows. (https://www.kaggle.com/burnoutminer/heightsand-weights-dataset) 2. Write a Python program to find the shape, size, datatypes of the dataframe object. 3. Write a Python program to view basic statistical details of the data. 4. Write a Python program to get the number of observations, missing values and nan values. 5. Write a Python program to add a column to the dataframe “BMI” which is calculated as : weight/height2 6. Write a Python program to find the maximum and minimum BMI. 7. Write a Python program to generate a scatter plot of height vs weight
import pandas as pd
df=pd.read_csv("/data/ty64/Desktop/ty64/FDS/Assignment no-1/SOCR-HeightWeight.csv")
df.head(10)
df.tail(10)
df.sample(20)
print(df)
print("shape of dataframe object:",df.shape)
print("size of dataframe object:",df.size)
print("datatype of dataframe object:",df.dtypes)
print("statistical data:",df.describe())
print("Number of obeservation:",df.info())
print("Missing values:",df.isnull())
df["BMI"]=weight/(height)**2
Comments
Post a Comment