vault backup: 2024-03-16 17:51:42

This commit is contained in:
2024-03-16 17:51:42 +08:00
parent 2ccc124845
commit 7c84299a15

View File

@@ -211,7 +211,6 @@ plt.show()
![image.png|600](https://image.kfdr.top/i/2024/03/16/65f5625b9cac2.png)
## 业务区域分布
```python
@@ -234,7 +233,21 @@ regional_category_distribution = data['Regional Category'].value_counts()
plt.figure(figsize=(8, 8))
plt.pie(regional_category_distribution, labels=regional_category_distribution.index, autopct='%1.1f%%', startangle=140, colors=['skyblue', 'orange'])
plt.title('业务区域分布')
plt.show()
# Next, group by the new regional category and sum the revenues
revenue_by_category = data.groupby('Regional Category')['总成交价'].sum()
# For the pie chart, we can directly use the revenue_by_category Series
# The index of this Series will be the labels, and the values will be the sizes for each pie slice
plt.figure(figsize=(8, 8))
plt.pie(revenue_by_category, labels=revenue_by_category.index, autopct='%1.1f%%', startangle=140, colors=['skyblue', 'orange'])
plt.title('营收贡献占比')
plt.show()
```
![image.png|600](https://image.kfdr.top/i/2024/03/16/65f568159bb5c.png)
![image.png|600](https://image.kfdr.top/i/2024/03/16/65f569fe39e54.png)
##