Open kurpav00 opened 1 year ago
No. there's no support for that. You would have to load the whole table and delete the ## rows, or do some pre-processing to change the input data.
On Wed, Feb 15, 2023 at 1:15 AM kurpav00 @.***> wrote:
I have a tab-separated file and I would need to read it into a table while skipping all comment lines starting with '##'. While there seems to be an option to specify a comment prefix as a single character (commentPrefix), I would need to be able to specify a char sequence as a comment prefix. Is this possible? (Some of the data rows start with a single '#', so simply specifying '#' as the comment char is not possible; only lines starting with '##' must be skipped)
— Reply to this email directly, view it on GitHub https://github.com/jtablesaw/tablesaw/issues/1185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2FPAWT4KCDQ7MWAQUFFIDWXRYAXANCNFSM6AAAAAAU4NYCKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
OK, thank you for your reply. I wonder which of the methods would need to be modified in order to change this behavior. I could either simply override it in my code or change it directly in the source code. But I am struggling to see where this behavior is coded.
I don't think it is implemented anywhere in tablesaw. In the CSV quasi-standard, a # starting a line is considered a comment marker. IIRC, this is handled by the CSV library we call.
On Wed, Feb 15, 2023 at 10:36 AM kurpav00 @.***> wrote:
OK, thank you for your reply. I wonder which of the methods would need to be modified in order to change this behavior. I could either simply override it in my code or change it directly in the source code. But I am struggling to see where this behavior is coded.
— Reply to this email directly, view it on GitHub https://github.com/jtablesaw/tablesaw/issues/1185#issuecomment-1431561346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2FPAXUAKX46PU3WZM2KN3WXTZYFANCNFSM6AAAAAAU4NYCKA . You are receiving this because you commented.Message ID: @.***>
OK, thanks. So file preprocessing is probably the only way to go.
I have a tab-separated file and I would need to read it into a table while skipping all comment lines starting with '##'. While there seems to be an option to specify a comment prefix as a single character (commentPrefix), I would need to be able to specify a char sequence as a comment prefix. Is this possible? (Some of the data rows start with a single '#', so simply specifying '#' as the comment char is not possible; only lines starting with '##' must be skipped)