read_fwf 'infer' where first hundred lines differ from other lines #15138
Code Sample, a copy-pastable example if possible
I have a long fixed-width file (>100k lines) that whose head and tail are shown above. I want to read this file with pandas. I figure
A couple of approaches to solving this issue come to mind, though I'm sure there are others:
I think it would be reasonable to pass down a new parameter, maybe
PR's would be welcome!
Ran into the same issue. Had to sort the file to have larger numbers or top.
I'd suggest, at least for numeric columns, not to infer the left boundary for the first column but go with 0.
I'd rather see a very conservative approach where nothing gets stripped/truncated initially. Rather, we can trim strings later on, if needed.
referenced this issue
Oct 19, 2018
I just submitted a PR to address this issue. I left out the