numpy.char.center

char.center(a, width, fillchar=' ')[源代码]

返回的副本 a 其元素以一串长度为中心 width .

调用 str.center 元素的。

参数
a类似str或unicode的数组
width利息

结果字符串的长度

fillcharstr或unicode,可选

要使用的填充字符(默认为空格)。

返回
out恩达雷

str或unicode的输出数组,取决于输入类型

参见

str.center