pandas.read_csv()方法中的`sep`和`delimiter`属性之间有什么区别? [英] What is the difference between `sep` and `delimiter` attributes in pandas.read_csv() method?
问题描述
pandas.read_csv()
方法中的sep
和delimiter
属性之间有什么区别?
What is the difference between sep
and delimiter
attributes in pandas.read_csv()
method?
当我选择一个而不是另一个时会发生什么情况?
Also what is the situation when I would choose one over the other?
在文档中,我在定界符中读到了一些关于Python内置嗅探器工具的信息,它表示 sep的替代参数名称,那么为什么我们不能只有一个属性?
In documentation I read something about Python builtin sniffer tool, also in delimiter, it says alternative argument name for sep, then why cant we have only one attribute?
推荐答案
可以在我同意另一个答案,那就是最好坚持使用sep
.它似乎更常用,并且与其他功能(例如 to_csv
,它不接受delimiter
,仅接受sep
.
I agree with the other answer that it is best to stick to sep
. It seems to be more commonly used, and it is more consistent with other functions such as to_csv
, which does not accept delimiter
, only sep
.
这篇关于pandas.read_csv()方法中的`sep`和`delimiter`属性之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!