当前位置: 代码迷 >> 综合 >> sys:1: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a futu
  详细解决方案

sys:1: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a futu

热度:22   发布时间:2023-11-25 05:20:56.0

当使用pandas.read_csv函数读取数据时若使用error_bad_lines=False来跳过错误行会出现警告:

sys:1: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a future version.

这是因为参数error_bad_lines自 1.3.0 版起已被弃用,应改为使用 on_bad_lines 参数来指定遇到坏行时的行为。即将error_bad_lines=False改为on_bad_lines='skip'

  相关解决方案