You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import numpy as np
import pandas as pd
# statsmodels is used to build statistical models
import statsmodels.api as sm
# To split the data into train and test sets
from sklearn.model_selection import train_test_split
# Load the dataset
cook = pd.read_csv('Chapter 9 - Case Study Dataset - Cookingrange.csv')
# Manually print DataFrame info in the required format
for i, (col, dtype) in enumerate(zip(cook.columns, cook.dtypes)):
non_null = cook[col].notnull().sum()
print(f"{i} \n{col} \n{non_null} non-null \n{dtype}") #3917