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.1.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for Topsis_Harsh_102203215-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d2fc2c172882d755456889efeae7f895f4f84e13cd447fbeb43472fa49751b5c
MD5 a1a6757ed13773928f90a9e5d7098c48
BLAKE2b-256 a8e02b74c228b53042ec034c2959f457c3077a69d30530e37f7f27290d4652c6

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