在Excel中绘制各种列
我有一个带有几列的Excel文件。 在此列中,我想绘制具有这样的名称的列: ivof_1_h,ivof_1_l,ivof_2_h,ivof_2_l,...这些列将在y轴上。 相同
对于X轴,列将始终与我不知道文件中有多少列 。我只知道这个数字正在增加。是否有可能检查我拥有多少个IVOF列并绘制它们的可能性。
通常,这些IVOF列有一个限制如果缺少这些列之一,代码将崩溃。
I have an Excel file with several columns.
From this columns I want to plot columns which have a name like this:
IVOF_1_H, IVOF_1_L, IVOF_2_H, IVOF_2_L,...those columns will be on y axis. For the x axis the column will always be the same
I do not know how many of those columns I have in the file. I only know that the number is increasing. Is there any possibility to check how many of those IVOF columns I have and plot them.
In general, there is a limitation of those IVOF columns and I don't mind to set up my script in a way that all of those columns got plotted (if they are existing), but then I don't know how to avoid the code to crash if one of those columns is missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过其列名过滤数据框:
简单示例:
结果:
You can filter your data frame by its column name:
simple example:
The result: