text_plain_output_1.png
import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

mpg_df = pd.read_csv('/kaggle/input/autompg-dataset/auto-mpg.csv')

mpg_df.columns

mpg_df = mpg_df.drop('car name', axis=1)
mpg_df = pd.get_dummies(mpg_df, columns=['origin'])

temp = pd.DataFrame(mpg_df.horsepower.str.isdigit())
temp[temp['horsepower'] == False]

mpg_df = mpg_df.replace('?', np.nan)
mpg_df[mpg_df.isnull().any(axis=1)]