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 Distribution

Topsis-Harsh-102203215-1.4.9.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file Topsis-Harsh-102203215-1.4.9.tar.gz.

File metadata

  • Download URL: Topsis-Harsh-102203215-1.4.9.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for Topsis-Harsh-102203215-1.4.9.tar.gz
Algorithm Hash digest
SHA256 3d2d98b1bb4dd47d1271b2a34b3b6bc4c334ac066fd88aa6275e2c0ccf08523b
MD5 af9b61607376afc9cc411d7f133e07d2
BLAKE2b-256 55d29918d8bcf15d8296d1ece480db2ffad9a88790e0cb32cea8ee839783d894

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Harsh_102203215-1.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad33cc620f731964211b431410523f3f16f7c466ee07efd2194365478e86330
MD5 7495da4a401fa8a0d08d6271603fd19a
BLAKE2b-256 8792db0a1dd0e6ca7c7e3ab1c28cac80e9f1ca32c1d9dd6437bdd440172d1715

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