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

国外科技感强的网站wordpress文章版权

国外科技感强的网站,wordpress文章版权,房地产信息网查询,自媒体平台账号我是Python中Pandas概念的新手.通常情节不是问题.但是,我现在面临的是包含索引的数据框.不知何故什么都没有了.我想要实现的目标#xff1a;为每个列[Plant1,Plant2,Plant3]创建一个特定柱[Trafo1]的子图.这是我的代码#xff1a;import numpy as npimport datetimeimport nu…我是Python中Pandas概念的新手.通常情节不是问题.但是,我现在面临的是包含索引的数据框.不知何故什么都没有了.我想要实现的目标为每个列[Plant1,Plant2,Plant3]创建一个特定柱[Trafo1]的子图.这是我的代码import numpy as npimport datetimeimport numpy as npimport matplotlibimport matplotlib.pyplot as pltimport pandas as pdimport os# Create the sample dataplant1 {Date : pd.date_range(1/1/2011, periods10, freqD),Plant : pd.Series([Plant1]*10),Output : pd.Series(abs(np.random.randn(10)))}plant2 {Date : pd.date_range(1/3/2011, periods10, freqD),Plant : pd.Series([Plant2]*10),Output : pd.Series(abs(np.random.randn(10)))}plant3 {Date : pd.date_range(1/5/2011, periods10, freqD),Plant : pd.Series([Plant3]*10),Output : pd.Series(abs(np.random.randn(10)))}trafo1 {Date : pd.date_range(1/5/2011, periods10, freqD),Plant : pd.Series([Trafo1]*10),Output : pd.Series(abs(np.random.randn(10)))}trafo2 {Date : pd.date_range(1/5/2011, periods10, freqD),Plant : pd.Series([Trafo2]*10),Output : pd.Series(abs(np.random.randn(10)))}df_plant_1 pd.DataFrame(plant1)df_plant_2 pd.DataFrame(plant2)df_plant_3 pd.DataFrame(plant3)df_trafo_1 pd.DataFrame(trafo1)df_trafo_2 pd.DataFrame(trafo2)sample pd.concat([df_plant_1,df_plant_2,df_plant_3,df_trafo_1,df_trafo_2])test pd.pivot_table(sample, indexDate, columnsPlant, valuesOutput)test test.fillna(methodpad)test test.fillna(methodbfill)# Draw the plotsmatplotlib.style.use(ggplot)cols len(test.columns) - 1fig, axes plt.subplots(nrowscols/2, ncols2, figsize(12, 4))for column in test.iloc[:,:-1]:test.plot(xtest[column], ytest[Trafo1], titlecolumn)plt.gca().set_aspect(equal, adjustablebox)plt.show()导致以下错误输出runfile(C:/..../untitled12.py, wdirC:/...)Traceback (most recent call last):File , line 1, in runfile(C:/Users/bjl/untitled12.py, wdirC:/Users/bjl)File C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py, line 699, in runfileexecfile(filename, namespace)File C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py, line 74, in execfileexec(compile(scripttext, filename, exec), glob, loc)File C:/Users/bjl/untitled12.py, line 52, in test.plot(xtest[column], ytest[Trafo1], titlecolumn)File C:\Anaconda2\lib\site-packages\pandas\tools\plotting.py, line 3671, in __call__sort_columnssort_columns, **kwds)File C:\Anaconda2\lib\site-packages\pandas\tools\plotting.py, line 2556, in plot_frame**kwds)File C:\Anaconda2\lib\site-packages\pandas\tools\plotting.py, line 2370, in _plotseries data[y].copy() # Dont modifyFile C:\Anaconda2\lib\site-packages\pandas\core\frame.py, line 1963, in __getitem__return self._getitem_array(key)File C:\Anaconda2\lib\site-packages\pandas\core\frame.py, line 2007, in _getitem_arrayindexer self.ix._convert_to_indexer(key, axis1)File C:\Anaconda2\lib\site-packages\pandas\core\indexing.py, line 1150, in _convert_to_indexerraise KeyError(%s not in index % objarr[mask])KeyError: [ 1.20311253 1.20311253 1.20311253 1.20311253 1.20311253 0.32765014\n 1.65686117 2.58118029 0.58903059 0.13907876 0.59270297 0.27072611\n 0.50167366 1.0310578 ] not in index我不明白索引的问题是什么.我无法在线找到任何帮助,因为所有示例都没有索引.我非常感谢你的帮助.这个错误对新手来说很神秘.
http://www.zqtcl.cn/news/308866/

相关文章:

  • 无锡专业做网站的怎么攻击php做的网站
  • 盐城网站建设代理商wordpress定义字体颜色
  • 成都旅游网站建设地址自己做的网站怎么被搜索出来
  • 网站建设免费免代码商城微网站如何做
  • 网站建设域名是什么东莞网络科技营销
  • 法语网站建设高端网站建设 骆
  • vue网站开发注意事项做设计想接外单去哪个网站好
  • 免费模板下载网站推荐苏州seo
  • 徐州市水利工程建设有限公司网站网站建设技术团队有多重要性
  • 合肥佰瑞网站搜索引擎优化步骤
  • 营销型网站建设亏1广西桂林天气预报15天
  • 想做一个网站平台怎么做公司网站建设费用估计
  • 电商网站开发平台pi netwo网页设计文件下载
  • 南平网站设计笔记本怎么建设网站
  • 舆情分析网站免费人工智能培训班收费标准
  • 青岛网站建设 大公司制作相册视频
  • 什么是网站的域名jquery素材网站
  • 课程网站建设ppt模板百度seo推广
  • 网站建设需要用到什么怎么在电脑上用手机app软件
  • 公司做网站有意义么网站认证必须做么
  • 网站虚拟空间更新缓存php外贸网站建设
  • 河南省建设执业资格注册中心网站门户定制网站建设公司
  • 网站开发比较厉害wordpress中文 插件
  • 文化投资的微网站怎么做个人微信公众号如何推广
  • 单位的网站怎样设计才美观网页设计图片的代码
  • 长沙专业做网站排名济南手机网站定制费用
  • 西安专题门户响应式网站建设系统网站有哪些
  • 山东省建设局网站监理员考试asp.net mvc6电商网站开发实践
  • 做网站需要提供什么资料网站备案是什么意思
  • 河南网站建设及推广东莞百度代做网站联系方式