Pandas通过Series上的.str访问器暴露字符串方法,允许对整个列进行向量化文本操作。方法包括.str.strip()、.str.lower()、.str.contains()、.str.replace()、.str.split()和.str.extract()。这些方法避免了遍历行进行字符串清理的需要。
.str
.str.strip()
.str.lower()
.str.contains()
.str.replace()
.str.split()
.str.extract()
用自己的话写下这一站的结论。