Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df_diesel["bins"] = pd.cut(df_diesel['Price BGN'], [0,5000,10000,15000,20000,4000000])
- ax = df_diesel["bins"].value_counts(normalize=True).plot.bar()
- ax.bar_label(ax.containers[0], label_type='edge')
- plt.xlabel('Price BGN')
- plt.ylabel('Percentages')
- plt.title("Diesel engines: Price Distribution")
- plt.show()
- #####################################################################################
- plt.figure(figsize=(14, 8), dpi=100)
- x = transform_df['Salary']
- y = transform_df['Count']
- plt.bar(x, y ,align='center') # A bar chart
- plt.xlabel('Средна заплата')
- plt.ylabel('Преброяване')
- for i in range(len(y)):
- plt.hlines(y[i],0,x[i]) # Here you are drawing the horizontal lines
- plt.title('Разпределение на обявите за свободни работни места към 7 октомври 2022')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement