script that combines multiple csv files into one
The script uses the pandas library converting each csv file into a data frame and then concatenation each frame.The readme instructions assumes the script being run in a windows enviroment.
- Python3
- Pandas
-
To install python3 on windows : https://www.python.org/downloads/windows/ and choose the latest release for python3. Once you install python, check that pip is also installed. You can type pip --version into the command line which will show you the version. If you get any other output, it means pip is not installed.
-
Install pandas
pip install pandas
- Place the file combiner.py in the same directory as you csv files you want to combine
- Navigate to that directory via the command line. Note( You cannot use UNC paths in the command line) to overcome this use the command pushd, see below
- Type the command: python combiner.py . You can also supply a filename to the script. For example: python combiner.py . 'yourfilename'.csv. Note โ.โ Represents the current directory.
- Once done, type the command popd, this will get you back to your current directory.