# Topsis-Harsh-102203215
**Topsis-Harsh-102203215** is a Python package for performing the **TOPSIS** (Technique for Order of Preference by Similarity to Ideal Solution) ranking method on decision matrices. This package allows you to rank alternatives based on multiple criteria, with support for both CLI and programmatic usage. It also provides CLI functionality for processing CSV and Excel files.
## Installation
You can install the package from PyPI using pip:
```bash
pip install Topsis-Harsh-102203215
```
# Usage
CLI Usage
After installation, you can use the package directly from the command line. The general syntax for the CLI is:
topsis <input_file> <weights> <impacts> <output_file>
input_file: The path to a CSV file containing the decision matrix (alternatives x criteria).
weights: A comma-separated list of weights corresponding to each criterion (e.g., 1,1,1,1).
impacts: A comma-separated list of impacts for each criterion, where + indicates a benefit and - indicates a cost (e.g., +,+, -, +).
output_file: The path where the output will be saved.
Example:
```bash
topsis input.csv "1,1,1,1" "+,+,-,+" output.csv
```
# Call the topsis function
rankings, scores = topsis(data, weights, impacts)
# Print the rankings and scores
print("Rankings:", rankings)
print("Scores:", scores)
# Features
TOPSIS: Perform multi-criteria decision-making using the TOPSIS method.
CLI: Command-line interface to process decision matrices in CSV files and output rankings.
Supports CSV Files: Easily read and write decision matrices in CSV format.
# Requirements
Python 3.6 or higher
numpy >= 1.21.0
pandas >= 1.3.0
# License
This project is licensed under the MIT License - see the LICENSE file for details.
# Author
Harsh Lakyan
Email: harshlakyan@gmail.com
GitHub: https://github.com/harshlakyan51
Raw data
{
"_id": null,
"home_page": null,
"name": "Topsis-Harsh-102203215",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "topsis, multi-criteria decision making, python, pypi, csv, xlsx, cli",
"author": "Harsh Lakyan",
"author_email": "harshlakyan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/55/d2/9918d8bcf15d8296d1ece480db2ffad9a88790e0cb32cea8ee839783d894/Topsis-Harsh-102203215-1.4.9.tar.gz",
"platform": null,
"description": "# Topsis-Harsh-102203215\r\n\r\n**Topsis-Harsh-102203215** is a Python package for performing the **TOPSIS** (Technique for Order of Preference by Similarity to Ideal Solution) ranking method on decision matrices. This package allows you to rank alternatives based on multiple criteria, with support for both CLI and programmatic usage. It also provides CLI functionality for processing CSV and Excel files.\r\n\r\n## Installation\r\n\r\nYou can install the package from PyPI using pip:\r\n\r\n```bash\r\npip install Topsis-Harsh-102203215\r\n```\r\n\r\n# Usage\r\nCLI Usage\r\nAfter installation, you can use the package directly from the command line. The general syntax for the CLI is:\r\n\r\ntopsis <input_file> <weights> <impacts> <output_file>\r\n\r\ninput_file: The path to a CSV file containing the decision matrix (alternatives x criteria).\r\n\r\nweights: A comma-separated list of weights corresponding to each criterion (e.g., 1,1,1,1).\r\n\r\nimpacts: A comma-separated list of impacts for each criterion, where + indicates a benefit and - indicates a cost (e.g., +,+, -, +).\r\n\r\noutput_file: The path where the output will be saved.\r\n\r\n\r\nExample:\r\n```bash\r\ntopsis input.csv \"1,1,1,1\" \"+,+,-,+\" output.csv\r\n```\r\n\r\n\r\n# Call the topsis function\r\nrankings, scores = topsis(data, weights, impacts)\r\n\r\n# Print the rankings and scores\r\nprint(\"Rankings:\", rankings)\r\nprint(\"Scores:\", scores)\r\n\r\n\r\n# Features\r\n\r\nTOPSIS: Perform multi-criteria decision-making using the TOPSIS method.\r\n\r\nCLI: Command-line interface to process decision matrices in CSV files and output rankings.\r\n\r\nSupports CSV Files: Easily read and write decision matrices in CSV format.\r\n\r\n# Requirements\r\n\r\nPython 3.6 or higher\r\nnumpy >= 1.21.0\r\npandas >= 1.3.0\r\n\r\n# License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n\r\n# Author\r\n\r\nHarsh Lakyan\r\nEmail: harshlakyan@gmail.com\r\nGitHub: https://github.com/harshlakyan51\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for TOPSIS ranking with CLI support for CSV/Excel files",
"version": "1.4.9",
"project_urls": null,
"split_keywords": [
"topsis",
" multi-criteria decision making",
" python",
" pypi",
" csv",
" xlsx",
" cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8792db0a1dd0e6ca7c7e3ab1c28cac80e9f1ca32c1d9dd6437bdd440172d1715",
"md5": "7495da4a401fa8a0d08d6271603fd19a",
"sha256": "0ad33cc620f731964211b431410523f3f16f7c466ee07efd2194365478e86330"
},
"downloads": -1,
"filename": "Topsis_Harsh_102203215-1.4.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7495da4a401fa8a0d08d6271603fd19a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5149,
"upload_time": "2025-01-19T13:44:02",
"upload_time_iso_8601": "2025-01-19T13:44:02.015238Z",
"url": "https://files.pythonhosted.org/packages/87/92/db0a1dd0e6ca7c7e3ab1c28cac80e9f1ca32c1d9dd6437bdd440172d1715/Topsis_Harsh_102203215-1.4.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "55d29918d8bcf15d8296d1ece480db2ffad9a88790e0cb32cea8ee839783d894",
"md5": "af9b61607376afc9cc411d7f133e07d2",
"sha256": "3d2d98b1bb4dd47d1271b2a34b3b6bc4c334ac066fd88aa6275e2c0ccf08523b"
},
"downloads": -1,
"filename": "Topsis-Harsh-102203215-1.4.9.tar.gz",
"has_sig": false,
"md5_digest": "af9b61607376afc9cc411d7f133e07d2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4651,
"upload_time": "2025-01-19T13:44:04",
"upload_time_iso_8601": "2025-01-19T13:44:04.108362Z",
"url": "https://files.pythonhosted.org/packages/55/d2/9918d8bcf15d8296d1ece480db2ffad9a88790e0cb32cea8ee839783d894/Topsis-Harsh-102203215-1.4.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 13:44:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "topsis-harsh-102203215"
}