pica2csv.py converts complex PICA data sets, which consist of rows with different key numbers, into a tabular CSV format. Each row is divided into columns according to its key identifiers (e.g. 0100, 0200, 0501, etc.).
Copy pica2csv.py to a directory of your choice, change to that directory and call it as follows:
Extract all keys in the file (default):
python script.py data.txt output.csv
Extract only specific keys in the file:
python pica2csv.py data.txt output.csv --key 2000 4000 7800
The examples shown assume that pica2csv.py and data.txt are located in the same directory. The output.csv is then written to the same directory.
This project is open-source and available under the MIT License