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}") #621
pause-community-contributions.yml
on: issues
pause
/
Pause Community Contributions
5s