File size: 395 Bytes
c8e0175
 
 
6f41b63
c8e0175
6f41b63
 
c8e0175
6f41b63
 
c8e0175
6f41b63
c8e0175
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pandas as pd
import numpy as np

def find_similar(p_index, similarity_matrix, filtered_df, top_x):
    selected_row = similarity_matrix[p_index]
    filtered_indices = filtered_df.index.tolist()
    print(filtered_indices)

    index_position_mapping = {index: position for position, index in enumerate(filtered_indices)}
    print(index_position_mapping)

    return "top_projects_df"