Skip to main content

A package for topsis score generation in mere moments

Project description


Lightning Fast Topsis Score Generator

By Vyom Chopra


 

"Topsis-Vyom-101917060":
A package that comes real handy when calculating topsis score. It's one stop destination for all Topsis related work.

  "Using this topsis package, calculating topsis score is nothing more than a child's play."

The function 'build_topsis()' in this package, will return the final dataset with topsis score and corresponding rank column. This function takes three arguments:

  • data: the original dataset upon which you want to calculate topsis score,
  • weights: a list that contains the pre-determined weights for all the numeric columns (int/float),
  • impacts: a list that contains the pre-determined impacts for all the numeric columns ('+'/'-')

To add such an amazing capability to your python workspace, simply type in the following command in the command prompt.

pip install Topsis-Vyom-101917060

This will install the topsis package in your workspace.

The build_topsis() have inbuilt functionality:
  • to detect numeric columns and automatically calculate topsis score only off them.
  • to check contents of both weights and impacts list for any discrepancy.
  • to handle any exception raised.

Now, when you write your python code, simply add this amazing functionality into your code with just a tad bit of new line of code

import Topsis_Vyom_101917060

Sample Code

Let's see a sample case: Given below is a dataset of which, we need to find the topsis score and hence, corresponding rank.

Fund Name P1 P2 P3 P4 P5
M1 0.93 0.86 4.1 46.1 13
M2 0.67 0.45 6.1 44 12.81
M3 0.72 0.52 3.8 32.7 9.44
M4 0.73 0.53 4.1 45 12.59
M5 0.71 0.5 3.4 55.5 15.03
M6 0.74 0.55 7 63.3 17.9
M7 0.95 0.9 5.1 41.8 12.19
M8 0.63 0.4 7 63.5 17.88
weights = [1,1,1,1,1]
impacts = ['+','-','+','-','+']

In the code editor:

import pandas as pd
import Topsis_Vyom_101917060

data = pd.read_csv(input_data_path)
dataset = build_topsis(data,,weights,impacts)
print(dataset)

Hence, we get the final Output as:

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.93 0.86 4.1 46.1 13 0.368067725 8
M2 0.67 0.45 6.1 44 12.81 0.629815594 1
M3 0.72 0.52 3.8 32.7 9.44 0.488377092 5
M4 0.73 0.53 4.1 45 12.59 0.489923292 4
M5 0.71 0.5 3.4 55.5 15.03 0.461216998 6
M6 0.74 0.55 7 63.3 17.9 0.603048108 3
M7 0.95 0.9 5.1 41.8 12.19 0.416449713 7
M8 0.63 0.4 7 63.5 17.88 0.621465197 2

Isn't it amazing!!

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-Vyom-101917060-1.0.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Vyom_101917060-1.0.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Vyom-101917060-1.0.5.tar.gz.

File metadata

  • Download URL: Topsis-Vyom-101917060-1.0.5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for Topsis-Vyom-101917060-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b5e41310e320122cae2dd81862b1886c5246af18f3cda05e403e5f68eb26cdd3
MD5 f11b0ba85f8f577250eb00e294b76f4f
BLAKE2b-256 ab4c5652e3ec52bec273745e87611978a7e3f9f607c0632071f4373b7d24411b

See more details on using hashes here.

File details

Details for the file Topsis_Vyom_101917060-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: Topsis_Vyom_101917060-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for Topsis_Vyom_101917060-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa56ca43ac8cfb0b25a2940de3e00643f0adc99ac88d23b593e0d031c481a02
MD5 112c273b2070564a0fe7babc6f4ec880
BLAKE2b-256 e37921fdcddca61049bff29df4f0c2c4a42931cdaccc91c89ab05df27cca58ef

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