Skip to main content

A Python package for TOPSIS ranking with CLI support for CSV/Excel files

Project description

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:

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> <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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Topsis_Harsh_102203215-1.2.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file Topsis_Harsh_102203215-1.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Harsh_102203215-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bc32efbe5051d53602d35fa142c775fec6f8e6bd69f1ac038f7733f263a91400
MD5 ad4671b08e2bdb2455f04770623d1c3f
BLAKE2b-256 b7d4f5de306f5928edf6e8f87e9d470331c8f1f2661f5c04a3d0c85d73323e14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page