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

GM_df = pd.read_excel('/kaggle/input/juan-anyang/GM.xlsx')
Mining_df = pd.read_excel('/kaggle/input/juan-anyang/Mining.xlsx')
GM_df.fillna(0, inplace=True)
Mining_df.fillna(0, inplace=True)

GM_df['Reading No'] = GM_df['Reading No'].astype(str)

Mining_df['Reading No'] = Mining_df['Reading No'].astype(str)

dummies_GM = pd.get_dummies(GM_df['Type'])
GM_df = pd.concat([GM_df, dummies_GM], axis=1)
GM_df.columns

dummies_Mining = pd.get_dummies(Mining_df['Type'])
Mining_df = pd.concat([Mining_df, dummies_Mining], axis=1)
Mining_df.columns

Mining_df[['A', 'B', 'C', 'D']] = Mining_df[['A', 'B', 'C', 'D']].astype(int)
Mining_df.info()