I'm trying to write a cmd program to track the updated value of investments and things. I want to save their value in a CSV file using csv library and have a history of their values over time. there are some constant investments like ['Gold','Stock','Bit-coin'] and I have added them as default header in my program like this:
+------------+-------------+------------+
| Date | Stock | Gold | Bit-coin |
+------------+-------------+------------+
But I want my program to have the feature for adding Other categories as the user wants to name it. and add and also edit the header whenever wants to edit it. Is there any way to dynamically edit header names as new column data is added to the CSV file?