Closed claudiofsr closed 7 months ago
I have a CSV file with a header containing duplicate fields.
header: 'field_a;field_b;FooBar;field_c;FooBar;field_d'
I try to read a csv file and get the error:
Error: Error(Deserialize { pos: Some(Position { byte: 1017, line: 2, record: 1 }), err: DeserializeError { field: None, kind: Message("duplicate fieldFooBar") } })
Error: Error(Deserialize { pos: Some(Position { byte: 1017, line: 2, record: 1 }), err: DeserializeError { field: None, kind: Message("duplicate field
") } })
Would it be possible to automatically add an index number to headers that contain duplicate fields?
header: 'field_a;field_b;FooBar;field_c;FooBar [2];field_d'
Or something like this.
No, I don't think that's a good fit for this library. You can achieve what you want by modifying the headers first.
OK thanks
I have a CSV file with a header containing duplicate fields.
header: 'field_a;field_b;FooBar;field_c;FooBar;field_d'
I try to read a csv file and get the error:
Error: Error(Deserialize { pos: Some(Position { byte: 1017, line: 2, record: 1 }), err: DeserializeError { field: None, kind: Message("duplicate field
FooBar") } })
Would it be possible to automatically add an index number to headers that contain duplicate fields?
header: 'field_a;field_b;FooBar;field_c;FooBar [2];field_d'
Or something like this.