import pandas as pd
from scipy.optimize import linprog
import matplotlib.pyplot as plt
from matplotlib import rcParams
# 设置中文字体
rcParams['font.sans-serif'] = ['SimHei'] # 黑体
rcParams['axes.unicode_minus'] = False # 处理负号显示问题
# 读取数据
data = pd.read_csv('附件2.csv', encoding='gbk') # 根据实际文件路径修改
# 转换时间格式
data['时间'] = pd.to_datetime(data['时间'])
# 筛选五一黄金周期间的数据
start_date = '2024-04-29'
end_date = '2024-05-05&
09-05
471
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-30
1463
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-05
1558
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)