Numpy 跳过genfromtxt中的行
我有下表:Numpy 跳过genfromtxt中的行,numpy,genfromtxt,Numpy,Genfromtxt,我有下表: 2M00251602+5422547 7.180 9.000 2.200 #2M00255540+5749320 4.420 5.200 1.600 2M00274401+5330504 4.400 6.800 2.700 2M00331747+6327504 4.540
2M00251602+5422547 7.180 9.000 2.200
#2M00255540+5749320 4.420 5.200 1.600
2M00274401+5330504 4.400 6.800 2.700
2M00331747+6327504 4.540 5.900 0.400
#2M00333033+7054422 4.350 6.700 0.700
2M00350487+5953079 5.310 7.400 1.100
我想跳过有标签的行。如何要求genfromtxt跳过具有标签符号的行
注意:hashtag不需要在那里。我只需要跳过用户指定的行
我知道在IDL中的READCOL下可以执行SKIPSTRING='#'。genfromtxt中是否有类似的内容?如果没有,我可以使用什么程序/包来读取这样的表并跳过用户指定的行
提前谢谢 使用'scomments='#'
参数
从文档中:
comments : str, optional
The character used to indicate the start of a comment.
All the characters occurring on a line after a comment are discarded