Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ matn_info = matn_info.drop(307206)
|
|
25 |
matn_info['taraf_ID'] = matn_info['taraf_ID'].replace('KeyAbsent', -1)
|
26 |
matn_info['taraf_ID'] = matn_info['taraf_ID'].astype(int)
|
27 |
|
28 |
-
matn_info['
|
29 |
matn_info['Hadith Number'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[1]))
|
30 |
-
matn_info =
|
31 |
cols_to_use = df.columns.difference(matn_info.columns)
|
32 |
|
33 |
joined_df = matn_info.merge(df[cols_to_use], left_index=True, right_on='__index_level_0__')
|
|
|
25 |
matn_info['taraf_ID'] = matn_info['taraf_ID'].replace('KeyAbsent', -1)
|
26 |
matn_info['taraf_ID'] = matn_info['taraf_ID'].astype(int)
|
27 |
|
28 |
+
matn_info['Book_ID'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[0]))
|
29 |
matn_info['Hadith Number'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[1]))
|
30 |
+
matn_info = pd.merge(matn_info, books, on='Book_ID')
|
31 |
cols_to_use = df.columns.difference(matn_info.columns)
|
32 |
|
33 |
joined_df = matn_info.merge(df[cols_to_use], left_index=True, right_on='__index_level_0__')
|