'Python 3 does not show the barchart

I am trying to make this bargraph appear in the python run screen. But for some reason, it does not show the graph on the screen. However, if I put this code on the google online coding website, it shows the bar graph fine. Can anyone let me know what the problem is?

import pandas as pd
import plotly.express as px

df = pd.read_csv("Diversity2.csv")
df = df.groupby(['School','White'], as_index=False)[['School']].sum()
# df = df.groupby(['School','White']).sum().plot(kind='bar')

df['White']=df['White'].astype(float)

# df.plot(kind='bar', x='School', y='White', figsize=(20,10))
barchart = px.bar(
    data_frame=df,
    x="School",
    y="White",
    color="School",
    opacity=0.9,
    orientation="v",
    barmode='overlay')


barchart.show()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source