Spaces:
Sleeping
Sleeping
keep columns
Browse files
main.py
CHANGED
|
@@ -287,8 +287,9 @@ async def predict(
|
|
| 287 |
df_predicted = nameMappingHelper.map_standard_names()
|
| 288 |
# Create output dataframe and save to CSV
|
| 289 |
print("Columns of inputData.dataframe", inputData.dataframe.columns)
|
| 290 |
-
|
| 291 |
-
output_df = inputData.dataframe.copy()
|
|
|
|
| 292 |
output_df.loc[:, "出力_科目"] = df_predicted["出力_科目"]
|
| 293 |
output_df.loc[:, "出力_項目名"] = df_predicted["出力_項目名"]
|
| 294 |
output_df.loc[:, "出力_確率度"] = df_predicted["出力_確率度"]
|
|
|
|
| 287 |
df_predicted = nameMappingHelper.map_standard_names()
|
| 288 |
# Create output dataframe and save to CSV
|
| 289 |
print("Columns of inputData.dataframe", inputData.dataframe.columns)
|
| 290 |
+
column_to_keep = ['シート名', '行', '科目', '分類', '名称', '摘要', '備考']
|
| 291 |
+
output_df = inputData.dataframe[column_to_keep].copy()
|
| 292 |
+
output_df.reset_index(drop=False, inplace=True)
|
| 293 |
output_df.loc[:, "出力_科目"] = df_predicted["出力_科目"]
|
| 294 |
output_df.loc[:, "出力_項目名"] = df_predicted["出力_項目名"]
|
| 295 |
output_df.loc[:, "出力_確率度"] = df_predicted["出力_確率度"]
|