Hi All,
I just put together a simple script for merging files that you can use from the command line. It might be useful for some people in this situation.
[below instructions assume you are using Anaconda/Miniconda on Windows]
1. Install the trompy package
pip install trompy
2. Navigate to the folder with your FED csv files in
e.g. cd C:\Github\fed\data
3. [optional] List the data files (can make it easier if you are typing their names)
dir
4. Run the merge script passing the list of files you want to merge as the input (-i) enclosed in quotation marks and separated by commas and the file you want to write to as output (-o) including .csv extension
e.g. python -m trompy.merge_fed_files -i "FED004_121721_01.CSV, FED004_121721_01.CSV" -o merged.csv
Notes1. The order files are passed is important, the script does not yet test for chronological order.
2. I recommend putting a copy of your files into a new directory, always keep backups of raw files etc. You don't want to get arguments the wrong way round and accidentally overwrite original data files.
3. If you don't need the command line version the bit of the script that actually merges the files is super simple and can be found here for using in your own scripts
4. Happy to receive any comments on the utility of this or things that would make it better. Now that we have started using the FEDs more I will probably start to include more FED utilities in the trompy package (e.g. simple functions to parse the data).