Re: Preprocessing not quite fixed-width file before parsing

2022-11-25 Thread Loris Bennett
Thomas Passin writes: > On 11/24/2022 9:06 AM, Loris Bennett wrote: >> Thomas Passin writes: >> >>> On 11/23/2022 11:00 AM, Loris Bennett wrote: Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit >>>

Re: Preprocessing not quite fixed-width file before parsing

2022-11-24 Thread Thomas Passin
On 11/24/2022 9:06 AM, Loris Bennett wrote: Thomas Passin writes: On 11/23/2022 11:00 AM, Loris Bennett wrote: Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit in_doubtgrace |files quotalimit in_d

Re: Preprocessing not quite fixed-width file before parsing

2022-11-24 Thread Loris Bennett
Thomas Passin writes: > On 11/23/2022 11:00 AM, Loris Bennett wrote: >> Hi, >> I am using pandas to parse a file with the following structure: >> Name filesettype KB quota limit >> in_doubtgrace |files quotalimit in_doubtgrace >> shortname shared

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Thomas Passin
On 11/23/2022 11:00 AM, Loris Bennett wrote: Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit in_doubt grace |files quotalimit in_doubtgrace shortname sharedhome USR14097664 52428800

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Weatherby,Gerard
; ','_') fixed_data = f"{' '.join(hparts)} | {tail}" return fixed_data return data except: logging.exception("read") logging.basicConfig() with Wrapper('data.txt') as f: df = pand

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Weatherby,Gerard
f"{' '.join(hparts)} | {tail}" return fixed_data return data except: logging.exception("read") logging.basicConfig() with Wrapper('data.txt') as f: df = pandas.read_csv(f, delimiter=r"\s+") print

Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Loris Bennett
Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit in_doubt grace |files quotalimit in_doubtgrace shortname sharedhome USR14097664 524288000 545259520 0 none | 107110