admin管理员组文章数量:1403436
I've been going through the pandera
docs and I cannot find a way to change the title of an existing pandera.DataFrameSchema
. Currently I do the following, which seems to work but feels weird because usually APIs define methods that cleanly change the properties (for instance, I have no way of knowing if changing the title
like this causes some unforeseen side effects):
import pandera as pa
dfs1 = pa.DataFrameSchema(
columns={
"a": pa.Column(int)
},
title="DFS 1 with col 'a'"
)
dfs2 = dfs1.add_columns(
{"b": pa.Column(int)}
)
dfs2.title = "DFS 2 with cols 'a' & 'b'"
Is it how we're supposed to do or is there some utility somewhere in pandera
that I missed?
本文标签: pythonHow to change the title of a DataFrameSchema in panderaStack Overflow
版权声明:本文标题:python - How to change the title of a DataFrameSchema in pandera? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744414026a2605099.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论