Metadata-Version: 2.2
Name: topsis_sachet_102203345
Version: 1.0.0
Summary: A Python package to perform TOPSIS analysis on datasets.
Home-page: https://github.com/sachetsinghrawat/topsis_sachet_102203345
Author: Sachet Singh
Author-email: srawat_be22@thapar.edu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: pandas>=1.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TOPSIS Implementation in Python

---

## Overview
This Python script provides an implementation of the **TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution)** method, a widely used technique for multi-criteria decision-making. It calculates performance scores and ranks for a dataset based on specified weights and impacts.

---

## How to Use

Execute the script using the following command:

```bash
python topsis.py <inputFileName> <weights> <impacts> <resultFileName>
```

- `<inputFileName>`: Path to the CSV file containing the dataset.
- `<weights>`: Comma-separated list of weights for the criteria (e.g., `1,2,3`).
- `<impacts>`: Comma-separated list of impacts for the criteria (`+` for benefit, `-` for cost).
- `<resultFileName>`: Name of the output file where the results will be saved.

---

## Input File Guidelines
1. The input file must be a `.csv` format with a minimum of **3 columns**.
2. The first column can contain non-numeric values (e.g., identifiers).
3. All columns from the second onward must contain **numeric values**.

---

## Key Features
- **Validation**:
  - Ensures the correct number of command-line arguments.
  - Validates weights, impacts, and the consistency of column counts.
  - Handles missing or invalid input files.
- **Error Handling**:
  - Provides clear error messages for issues such as missing files, non-numeric data, or mismatched parameters.
- **Output Generation**:
  - Adds two columns to the dataset: `Topsis Score` and `Rank`.
  - Saves the processed results to the specified output file.

---

## Prerequisites
- Python 3.x
- Required libraries: `pandas`, `math`, `sys`

Install dependencies using the command:
```bash
pip install pandas
```

---

## License
This project is open-source and available under the MIT License.
