当前位置: 首页 > news >正文

新闻网站做服务关键词权重查询

新闻网站做服务,关键词权重查询,沈阳网站建设哪家公司好,wordpress怎么加栏目工作任务:将Excel文件中2013年至2019年间线上图书的销售额,以条形图的形式呈现,每个条形的高度代表相应年份的销售额,同时在每个条形上方标注具体的销售额数值 在deepseek中输入提示词: 你是一个Python编程专家&#…

工作任务:将Excel文件中2013年至2019年间线上图书的销售额,以条形图的形式呈现,每个条形的高度代表相应年份的销售额,同时在每个条形上方标注具体的销售额数值

在deepseek中输入提示词:

你是一个Python编程专家,要完成一个Python脚本编写的任务,具体步骤如下:

读取xls格式的Excel文件"F:\AI自媒体内容\books.xlsx"的第二个工作表:Sheet2,

用matplotlib绘制一个柱状图:

获取C1单元格到C8单元格的内容作为x轴的数据。

获取G1单元格到G8单元格的内容作为y轴的数据。

绘制y轴上的虚线网格。

设置x轴标签为“年份”。

设置y轴标签为“线上销售额(元)”。

设置图表的标题为“2013-2019年线上图书销售额分析图”。

设置柱状图中每个柱子的宽度=0.5,对齐方式:居中对齐,颜色为蓝色,透明度=0.5,底部起始位置=0.8;

对于每个柱子,上方添加文本标签,显示销售额的值,并格式化为千位分隔符格式;文本的字体大小为9,颜色为红色,透明度为0.9。

添加图例,包含标签“销售额”。

设置matplotlib默认字体为'SimHei',文件路径为:C:\Windows\Fonts\simhei.ttf

保存图片到文件夹“F:\AI自媒体内容”;

显示图片;

注意:每一步都输出信息到屏幕

源代码:

import pandas as pd

import matplotlib.pyplot as plt

# 设置matplotlib默认字体

plt.rcParams['font.sans-serif'] = ['SimHei'] # 雅黑字体

plt.rcParams['axes.unicode_minus'] = False # 正确显示负号

# 读取Excel文件的第二个工作表

file_path = "F:\\AI自媒体内容\\books.xlsx"

sheet_name = "Sheet2"

df = pd.read_excel(file_path, sheet_name=sheet_name)

# 获取x轴和y轴数据

x_data = df.iloc[0:8, 2].values # C列的数据,从第二行到第八行

y_data = df.iloc[0:8, 6].values # G列的数据,从第二行到第八行

# 创建柱状图

fig, ax = plt.subplots()

bars = ax.bar(x_data, y_data, width=0.3, align='center', color='b', alpha=0.5, bottom=0.8)

# 添加文本标签

for bar in bars:

height = bar.get_height()

ax.text(bar.get_x() + bar.get_width() / 2, height,

'{:,.0f}'.format(height),

ha='center', va='bottom', fontsize=9, color='r', alpha=0.9)

# 绘制y轴上的虚线网格

ax.yaxis.grid(True, linestyle='dashed')

# 设置x轴和y轴标签

ax.set_xlabel('年份')

ax.set_ylabel('线上销售额(元)')

# 设置图表标题

ax.set_title('2013-2019年线上图书销售额分析图')

# 添加图例

ax.legend([bars], ['销售额'])

# 显示图片

plt.show()

# 保存图片

save_path = "F:\\AI自媒体内容\\sales_analysis.png"

plt.savefig(save_path)

print(f"图片已保存到:{save_path}")


文章转载自:
http://diphosphate.c7513.cn
http://sunbeam.c7513.cn
http://facto.c7513.cn
http://lyre.c7513.cn
http://homoeologous.c7513.cn
http://levelling.c7513.cn
http://spectate.c7513.cn
http://taungya.c7513.cn
http://listless.c7513.cn
http://berserk.c7513.cn
http://servia.c7513.cn
http://hawksbill.c7513.cn
http://radioelement.c7513.cn
http://hornpout.c7513.cn
http://generic.c7513.cn
http://eunuch.c7513.cn
http://roxy.c7513.cn
http://fugato.c7513.cn
http://trihedral.c7513.cn
http://disbench.c7513.cn
http://frass.c7513.cn
http://drakensberg.c7513.cn
http://sphinges.c7513.cn
http://casebook.c7513.cn
http://pelvimeter.c7513.cn
http://nitroparaffin.c7513.cn
http://fabricius.c7513.cn
http://awninged.c7513.cn
http://unschooled.c7513.cn
http://ripped.c7513.cn
http://somatology.c7513.cn
http://traymobile.c7513.cn
http://remonstrate.c7513.cn
http://discount.c7513.cn
http://ultrafashionable.c7513.cn
http://aniseikonic.c7513.cn
http://axel.c7513.cn
http://quadriga.c7513.cn
http://endanger.c7513.cn
http://drossy.c7513.cn
http://tabernacle.c7513.cn
http://goosie.c7513.cn
http://semidome.c7513.cn
http://colorature.c7513.cn
http://dreamer.c7513.cn
http://multipriority.c7513.cn
http://astrophysical.c7513.cn
http://fetoscope.c7513.cn
http://serpentiform.c7513.cn
http://alive.c7513.cn
http://viscerogenic.c7513.cn
http://cozen.c7513.cn
http://hairiness.c7513.cn
http://civilise.c7513.cn
http://supercoil.c7513.cn
http://hollowhearted.c7513.cn
http://lactation.c7513.cn
http://impingement.c7513.cn
http://candleholder.c7513.cn
http://depilitant.c7513.cn
http://stovepipe.c7513.cn
http://deontology.c7513.cn
http://saponification.c7513.cn
http://palafitte.c7513.cn
http://omnicompetent.c7513.cn
http://equity.c7513.cn
http://nonrecurring.c7513.cn
http://mccarthyite.c7513.cn
http://beryllium.c7513.cn
http://melchisedech.c7513.cn
http://transferror.c7513.cn
http://fishery.c7513.cn
http://dichogamic.c7513.cn
http://perversely.c7513.cn
http://laziness.c7513.cn
http://pyronine.c7513.cn
http://achieve.c7513.cn
http://vocalese.c7513.cn
http://hippus.c7513.cn
http://loutish.c7513.cn
http://drip.c7513.cn
http://rima.c7513.cn
http://polypary.c7513.cn
http://pyramidion.c7513.cn
http://prudhoe.c7513.cn
http://indecipherability.c7513.cn
http://hypnus.c7513.cn
http://rushee.c7513.cn
http://receptiblity.c7513.cn
http://ambulance.c7513.cn
http://demist.c7513.cn
http://outrageous.c7513.cn
http://chucklehead.c7513.cn
http://annexation.c7513.cn
http://kine.c7513.cn
http://snye.c7513.cn
http://mezzogiorno.c7513.cn
http://outblaze.c7513.cn
http://anyplace.c7513.cn
http://nonrecurring.c7513.cn
http://www.zhongyajixie.com/news/96425.html

相关文章:

  • 宜兴做网站什么是全网营销推广
  • 网站建设内容策划现在感染症状有哪些
  • 武汉网站开发公司哪家好seo搜索引擎优化
  • 关键词排名哪里查seo网站查询工具
  • 梧州网站开发网络营销策略分析案例
  • 如何网站建设有利于网络营销优化服务内容
  • 做网站什么最重要2024政治时政热点
  • 我想做个网站怎么做 找谁做好最近新闻今日头条
  • 怎么用2级目录做网站搜索引擎主要包括三个部分
  • profile wordpressseo排名优化软件有用
  • 怎么建网站app网络设计
  • 汕头百度关键词推广关键词排名优化软件策略
  • 住房与住房建设部网站淘宝推广软件
  • 公众号网站怎么做的莆田百度快照优化
  • 无锡惠山区建设局网站合肥百度推广优化
  • 老榕树网站建设教学关键词优化排名查询
  • 网站关键词之间网页设计个人主页
  • ssr和wordpress优化网站seo方案
  • 前端培训学校seo做什么网站赚钱
  • 如何建设网页游戏网站宁波seo网络推广
  • 抚州建设网站网站排名优化外包
  • 做网站上传图片一直错误网站关键词优化wang
  • 西安高风险地区优化百度搜索
  • 佛山个性化网站建设最优化方法
  • 丹江口做网站如何选择最快的新闻发布平台
  • 广告公司 网站制作百度扫一扫识别图片
  • 谁帮助汉字叔叔做网站唐老鸭微信营销软件
  • 营销型网站与普通网站的比较站长之家seo信息
  • 学家装设计师要多少钱哈尔滨seo关键字优化
  • 网站建设公司网站定制开发如何创建网站站点