如何在雪花中找到看不见的角色
我正在从数据集中摘取数据集,其中两个列,old_value和new_value应该 不是 相等。但是我得到的虚假行被提出了。
例如:
old_value | new_value |
---|---|
abc | abc |
不应获取此行,但它在那里。在弄清楚原因后,它以下显示:
old_value | new_value | len(old_value) | len(new_value) |
---|---|---|---|
abc | abc | 4 | 3 |
我不确定为什么它为old_value显示“ 4”。我确实尝试用空白,新的线角色,regexp_replace替换空白,但没有奏效。
请建议如何查找并删除这个看不见的字符。谢谢你!
I am working on pulling data from a dataset where two columns, old_value and new_value should NOT be equal. But I am getting false rows being fetched.
For Example:
old_value | new_value |
---|---|
ABC | ABC |
This row should not be fetched but it was there. And upon figuring out why, it showed below:
old_value | new_value | len(old_value) | len(new_value) |
---|---|---|---|
ABC | ABC | 4 | 3 |
I am not sure why it showed "4" for old_value. I did try replacing white space with blank, new line character, regexp_replace, but none worked.
Please suggest how to find and remove this invisible character. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用正则表达式来删除非 ASCII 字符,
您必须适应您的数据的模式
you can use regular expresiions to remove non ascii charters
the pattern you must adapt to your data