Hi.
Im strugling with following problem. I have two inputs from command to files (i can import to two lists)
File 1:
customer1 file1 filestatus
customer1 file2 fileststus
customer2 file3 filestatus
and so on…
File 2:
File1indx
File2indx
File3indx
and so on…
respectively
Each line related to each line in two files
I need to import them to one list or dict to present them like this:
Customer1
file1 File1indx filestatus
file2 File2indx fileststus
Customer2
file3 File3indx filestatus
and so on…
Or just as above but without first column (file(n))
I managed to import File 1 and group by customer and print properly (without values from second file) but cant add File(n)indx because in above example first list will have two values like:
(customer1:(file1, filestatus),(file2, fileststus)),customer2:(file3,filestatus))
While second list pure three values.
I did try different solutions but failed to do it.
At the end i try execute external Bash script as concatenate two files with paste. Standalone works fine but when run script from python parent it returns some crap to 3th output file that I cant import.
From Bash i get produced file like:
customer1 file1 filestatus File1indx
customer1 file2 fileststus File2indx
customer2 file3 filestatus File3indx
But from python some extra lines (File(n)idx) , three extra lines and eventually can’t load it simple to one list.
Im stuck now.
Aby hints?
The best would be to do it in python but by file is ok. But any worked for me.
Hint. When I load first file it creates each value from three elements and treats as whole one.
In one hand its ok and i can pack them per customer1. But when comes to enrich with indx from second file (list) it leads to problem