text_plain_output_1.png image_output_1.png
import pandas as pd

df = pd.read_excel('../input/volve-production-data/Volve production data.xlsx')

df.isna().sum()

well_prod = df.groupby('NPD_WELL_BORE_NAME')['BORE_OIL_VOL'].sum()
well_prod

well_prod_g = df.groupby('NPD_WELL_BORE_NAME')['BORE_GAS_VOL'].sum()
well_prod_g

well_prod_w = df.groupby('NPD_WELL_BORE_NAME')['BORE_WAT_VOL'].sum()
well_prod_w

df_ml = df[df['WELL_TYPE'] == 'OP']
df_ml.shape

df_ml.columns

df_ml = df_ml[['DATEPRD', 'NPD_WELL_BORE_NAME', 'ON_STREAM_HRS', 'AVG_DOWNHOLE_PRESSURE', 'AVG_DOWNHOLE_TEMPERATURE', 'AVG_DP_TUBING', 'BORE_OIL_VOL', 'BORE_GAS_VOL', 'BORE_WAT_VOL', 'AVG_WHP_P', 'AVG_WHT_P', 'DP_CHOKE_SIZE']]

df_ml.rename(columns={'DATEPRD': 'date', 'NPD_WELL_BORE_NAME': 'well_name', 'ON_STREAM_HRS': 'prod_hrs', 'AVG_DOWNHOLE_PRESSURE': 'bhp', 'AVG_DOWNHOLE_TEMPERATURE': 'bht', 'AVG_DP_TUBING': 'dp_tubing', 'AVG_WHP_P': 'tht', 'AVG_WHT_P': 'thp', 'DP_CHOKE_SIZE': 'choke_size_percentage', 'BORE_OIL_VOL': 'oil_vol', 'BORE_GAS_VOL': 'gas_vol', 'BORE_WAT_VOL': 'water_vol'}, inplace=True)

df_ml.isna().sum()

df_ml = df_ml.dropna()

df_ml.shape