Professional Documents
Culture Documents
Code
Code
First we import panda ( a data analysis library in Python) as pd. Then the code will read the data from
the excel file “Data.xlsx” and stores it in an data frame variable “df”. then creates a list of codes that are
prerequisites for each month, which is stored in another variable named “time_list”. And then we have
“biendoi” function takes an input value X and then return values depending on X (one out of 26 value A
to Z) . the code start to run through all rows, values in the data frame. (example) After that the code
declare a list of integer, “data_list”. Then the code run in the list to check each element for equality with
another element in the list, The first function is check_link which takes two integers as input and
returns True if they are equal or False otherwise. Next is to compare every character in one string with
every character in other string until it finds a comma “,” to finds out that if there is no comma => both
string have an identical length and the code return “True”, Otherwise, it will keep comparing characters
until it reaches the end of one string and starts comparing characters from the beginning of the other
string again. This process continues until all items match or no comparison between items is possible.
Check_link_reverse: so we basically inverse the order of comparisions, next is to find the max and min
value of the list