image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

path = '/kaggle/input/h1bcsv/h1b.csv'

df = pd.read_csv(path)

case_status_counts = df['CASE_STATUS'].value_counts()
fig, ax = plt.subplots(figsize=(8, 8))
plt.pie(case_status_counts, labels=case_status_counts.index, autopct='%1.1f%%', textprops={'fontsize': 8})
plt.title('Petitions distributed by case statuses', y=1.1)
plt.tight_layout()
plt.show()