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
>>>
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
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
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
This seems to work. I’m inferring the | is present in each line that needs to
be fixed.
import pandas
import logging
class Wrapper:
"""Wrap file to fix up data"""
def __init__(self, filename):
self.filename = filename
def __enter__(self):
self.fh = open(self.filena
:
df = pandas.read_csv(f, delimiter=r"\s+")
print(df)
From: Weatherby,Gerard
Date: Wednesday, November 23, 2022 at 3:38 PM
To: Loris Bennett , python-list@python.org
Subject: Re: Preprocessing not quite fixed-width file before parsing
This seems to work. I’m inferring the | is