I have a csv file which has spaces in the column names in the header record. The source system is unable to rename the fields before sending - so, we have to handle this at our end before ingestion.
Hence, is there a way to remove the spaces and special characters from the column-names (,:; etc) in the header record and replace the new old column-names with the new column-names in the csv file.
For e.g. -
Current Header in the csv file :
S.No | Count of lines visited | Revenue | No. of clicks
Expected Header:
SNo | Countoflinesvisited | Revenue | Noofclicks
We can use Pyspark or Python. Please let me know if additional information is required.
Thanks.