コード例 #1
0
             insert_position="right",
             row=None,
             on=",",
             before=None,
             after=None,
             ignore_between=None,
             which=1,
             max=0,
             positions=None,
             quote_character=None))

# Cut from split on 'the'
w.add(
    dw.Cut(column=["split"],
           table=0,
           status="active",
           drop=False,
           result="column",
           update=True,
           insert_position="right",
           row=None,
           on="the",
           before=None,
           after=None,
           ignore_between=None,
           which=1,
           max=1,
           positions=None))

w.apply_to_file('cut.csv').print_csv('out.csv')
コード例 #2
0
               after=None,
               ignore_between=None,
               which=1,
               max=0,
               positions=None,
               quote_character=None))

# Cut  on '"'
w.add(dw.Cut(column=[],
             table=0,
             status="active",
             drop=False,
             result="column",
             update=True,
             insert_position="right",
             row=None,
             on="\"",
             before=None,
             after=None,
             ignore_between=None,
             which=1,
             max=0,
             positions=None))

# Cut from data between ']]' and ', '
w.add(dw.Cut(column=["data"],
             table=0,
             status="active",
             drop=False,
             result="column",
             update=True,
コード例 #3
0
            status="active",
            drop=False,
            direction="up",
            method="copy",
            row=None))

# Cut from fold before ' any lowercase word   any number '
w.add(
    dw.Cut(column=["fold"],
           table=0,
           status="active",
           drop=False,
           result="column",
           update=True,
           insert_position="right",
           row=None,
           on=".*",
           before="[a-z]+ \\d+",
           after=None,
           ignore_between=None,
           which=1,
           max=1,
           positions=None))

# Cut from fold after 'Total'
w.add(
    dw.Cut(column=["fold"],
           table=0,
           status="active",
           drop=False,
           result="column",
コード例 #4
0
             ignore_between=None,
             which=1,
             max=0,
             positions=None,
             quote_character=None))

# Cut from data on '| any lowercase word =#FFF any number  any word \|'
w.add(
    dw.Cut(column=["data"],
           table=0,
           status="active",
           drop=False,
           result="column",
           update=True,
           insert_position="right",
           row=None,
           on="\\|[a-z]+=#FFF\\d+[A-Za-z]+\\|",
           before=None,
           after=None,
           ignore_between=None,
           which=1,
           max="0",
           positions=None))

# Extract from data between ' any lowercase word |' and '}'
w.add(
    dw.Extract(column=["data"],
               table=0,
               status="active",
               drop=False,
               result="column",
コード例 #5
0
w.add(dw.SetName(column=["split6"],
                 table=0,
                 status="active",
                 drop=True,
                 names=["Days"],
                 header_row=None))

# Cut from Days on ' any number : any number  any lowercase word  -  any number : any number  any lowercase word '
w.add(dw.Cut(column=["Days"],
             table=0,
             status="active",
             drop=False,
             result="column",
             update=True,
             insert_position="right",
             row=None,
             on="\\d+:\\d+[a-z]+ - \\d+:\\d+[a-z]+",
             before=None,
             after=None,
             ignore_between=None,
             which=1,
             max=1,
             positions=None))

# Extract from split7 on ' any number '
w.add(dw.Extract(column=["split7"],
                 table=0,
                 status="active",
                 drop=False,
                 result="column",
                 update=False,