Mar-19-2018, 05:19 AM
Hi All
i just start python and if possible help with dictionary
INPUT FILE
THE 1-3 KEY value
1 2 3
ABC E 00001
ABC E 00003
ABC B 00001
ABC B 00005
ABC N 00001
ABC W 00001
XYZ E 00001
XYZ B 00001
XYZ N 00001
XYZ W 00001
Reading file i need to store value build in dictionary
need counts how many ABC E COUNTS AND ADD filed 3
need counts how many ABC B COUNTS AND ADD filed 3
need counts how many ABC W COUNTS AND ADD filed 3
need counts how many ABC N COUNTS AND ADD filed 3
need counts how many XYZ E COUNTS AND ADD filed 3
need counts how many XYZ B COUNTS AND ADD filed 3
need counts how many XYZ W COUNTS AND ADD filed 3
need counts how many XYZ N COUNTS AND ADD filed 3
AT END I NEED TO READ dictionary
AND WRITE FILES
the data should be dictionary
ABC E 2 00004
ABC B 2 00006
ABC N 1 00001
ABC W 1 00001
XYZ E 1 00001
XYZ B 1 00001
XYZ N 1 00001
XYZ W 1 00001
Please help Any idea how i should start with this?
Thank you
i just start python and if possible help with dictionary
INPUT FILE
THE 1-3 KEY value
1 2 3
ABC E 00001
ABC E 00003
ABC B 00001
ABC B 00005
ABC N 00001
ABC W 00001
XYZ E 00001
XYZ B 00001
XYZ N 00001
XYZ W 00001
Reading file i need to store value build in dictionary
need counts how many ABC E COUNTS AND ADD filed 3
need counts how many ABC B COUNTS AND ADD filed 3
need counts how many ABC W COUNTS AND ADD filed 3
need counts how many ABC N COUNTS AND ADD filed 3
need counts how many XYZ E COUNTS AND ADD filed 3
need counts how many XYZ B COUNTS AND ADD filed 3
need counts how many XYZ W COUNTS AND ADD filed 3
need counts how many XYZ N COUNTS AND ADD filed 3
AT END I NEED TO READ dictionary
AND WRITE FILES
the data should be dictionary
ABC E 2 00004
ABC B 2 00006
ABC N 1 00001
ABC W 1 00001
XYZ E 1 00001
XYZ B 1 00001
XYZ N 1 00001
XYZ W 1 00001
Please help Any idea how i should start with this?
Thank you