openvax / gtfparse

Parsing tools for GTF (gene transfer format) files
Apache License 2.0
109 stars 25 forks source link

Update read_csv params to on_bad_lines #24

Closed old-rob closed 1 year ago

old-rob commented 2 years ago

Pandas is moving from error_bad_lines and warn_bad_lines to on_bad_lines. Since error_bad_lines was set to True, I think that using on_bad_lines='error' will result in the desired behavior without throwing a FutureWarning each time gtfparse is used.

Other options would be to set on_bad_lines to 'warn', 'skip', or make a custom callback. See https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html#:~:text=bad%20line%20instead.-,on_bad_lines,-%7B%E2%80%98error%E2%80%99%2C%20%E2%80%98warn%E2%80%99%2C%20%E2%80%98skip for more information.

timodonnell commented 1 year ago

Thanks, this is finally fixed now