text_html_output_1.png
import pandas as pd

import plotly_express as px

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

fig_o = px.pie(names=well_prod.index, values=well_prod.values, labels={'names': 'Well ', 'values': 'Total oil production (bbls)'})
fig_o.update_traces(textposition='inside', textinfo='percent+label', hoverinfo='percent+label', marker=dict(line=dict(color='#000000', width=2)))
fig_o.update_layout(title_text='Contribution of each well in oil production', legend_title_text='Wells', legend_title_font_size=15, title_x=0.5, title_font_size=20, paper_bgcolor='#0C2D42', font_color='#fff')
fig_o.show()