This script was created to solve Arindam's need to substitute X's on DSM's for actual values.
- Ensure you have python installed in your computer. You can open a terminal and type
python -Vand it will tell you the python version. I created it using Python 3.10 but other versions will likely work. - Create a new python or conda environment, install the python packages listed in
requirements.txt
- Create a new folder anywhere in your PC where you have writing rights
- In that folder, create a subfolder called data.
- In
data, put all DSM's .cvs files that you want to change from X to numbers - In
data, put an Excel file namedValues.xlsxcontaining the CP values for each pair.- The name has to be specific so use the template.
- copy main.py to
data
- Open a terminal on the working folder location
- Activate the python/conda environment
- Run python main.py
- A new folder called
outputwill appear with your data in it - If you have an existing
outputfolder, it will be deleted and recreated.
- A new folder called
- This repo contains a dummy set of outputs in case you don't even want to run it.
- This code has NOT been properly tested.
Good luck!