Data Preprocessing
Merge Columns
This endpoint allows users to upload a CSV file and merge specified columns into a single column using a given delimiter.
Endpoint: POST /merge-columns
Request Parameters
File Upload
file
(required): CSV file to be processed.
Form Parameters
columns_to_merge
(required): A comma-separated list of column names to merge.delimiter
(optional, default:", "
)- The delimiter used to join the merged column values.
Processing Logic
- Read the uploaded file: The file is converted into a Pandas DataFrame.
- Validate columns: Ensures the specified columns exist in the file.
- Merge columns: The given columns are concatenated into a new column using the specified delimiter.
- Remove original columns: The merged columns are dropped from the DataFrame.
- Return the modified file: The processed file is provided for download.