简体   繁体   English

na_rep 参数代表什么?

[英]What does na_rep parameter stands for?

I am looking at cat method in Pandas我正在看 Pandas 中的cat 方法

I can not grasp what is na_rep .我无法理解什么是na_rep

Docs about Series.str.cat says:关于Series.str.cat文档说:

When na_rep is None (default behavior), NaN value(s) in the Series are ignored.当 na_rep 为 None (默认行为)时,系列中的 NaN 值将被忽略。

Series(['a','b',np.nan,'c']).str.cat(sep=' ')  
'a b c'

Series(['a','b',np.nan,'c']).str.cat(sep=' ', na_rep='?')  
'a b ? c'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM