API and CLI tool to calculate Topsis, CLI tool inputs CSV/Excel files
Project description
Topsis Package (API & CLI)
Python package that can be used as an API or as a CLI tool to calculate TOPSIS performance score and ranks.
CLI scripts takes
csv/excel
files as input!
Installation
pip install Topsis-Jayant-102097013
Command Line Usage
topsis input_file weights impacts output_file
Arguments
Arguments | Description |
---|---|
input_file | "CSV/Excel" file path |
weights | Comma separated numbers |
impacts | Comma separated '+' or '-' |
output_file | Output CSV file path |
Output
Creates a output_file, that contains the original data with performance score and rank.
Example:
topsis data.xlsx "2,2,3,3,4" "+,-,+,-,+" output.csv
API Usage
Steps
- Import topsis function from module topsis
- Invoke topsis function by passing in data, weights, impacts
Note: Impacts should be a list of -1 and 1. -1 depicting -ve and 1 depicting +ve impact
Example:
from topsis import topsis
import pandas as pd
df = pd.read_csv('data.csv')
weights = [2,2,3,3,4]
impacts=[1,-1,1,-1,1]
print(topsis(df, weights, impacts))
License
Licensed under the MIT License.
Development and Contributing
Yes, please! Feel free to contribute, raise issues and recommend best practices.
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
Built Distribution
File details
Details for the file Topsis-Jayant-102097013-1.1.3.tar.gz
.
File metadata
- Download URL: Topsis-Jayant-102097013-1.1.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0241b1291425bd3719dead7696134dbedab62fffeb72ab074fa3f510fedc79 |
|
MD5 | f2bcc416279a34765c2d55ff6195835d |
|
BLAKE2b-256 | 4b936388f9bf5e16f5f7f16f9b7d74992331072769d0b1c8d808d3c5d9db4c1f |
File details
Details for the file Topsis_Jayant_102097013-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: Topsis_Jayant_102097013-1.1.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60fd5f4aadd669e336f55d23c04758cdc2eb43714c450fd49b4f43ce445a4dc9 |
|
MD5 | 43bd919e6397469c2b8f8e8acc8fd07a |
|
BLAKE2b-256 | 4131995573997e33fbc114e3fd2891d5b3591ac6fa4e23c85c11aca725bc3808 |