get_writer#

astropy.io.ascii.get_writer(writer_cls=None, fast_writer=True, **kwargs)[源代码]#

初始化表写入器,允许进行常见的自定义。

各种参数的大多数默认行为由Writer类确定。

参数:
writer_clswriter_clswriter_cls

作家班。默认为 Basic

delimiter : strPython :字符串

列分隔符字符串

comment : strPython :字符串

在表中定义注释行的字符串

quotechar : strPython :字符串

一个字符串引用包含特殊字符的字段

formats : dictPython :词典

格式说明符或格式函数词典

strip_whitespace : bool布尔

从列值中去掉周围的空白。

names : listPython :列表

每个数据列对应的名称列表

include_names : listPython :列表

要包含在输出中的名称列表。

exclude_names : listPython :列表

要从输出中排除的名称列表(应用于 include_names

fast_writer : bool布尔

作家是否用得快。

返回:
作家BaseReader 子类BaseReader子类

ASCII格式写入程序实例