Update routes/hien_thi_hskh.py
Browse files- routes/hien_thi_hskh.py +3 -2
routes/hien_thi_hskh.py
CHANGED
|
@@ -16,11 +16,12 @@ async def hien_thi_hskh():
|
|
| 16 |
token=HF_TOKEN,
|
| 17 |
cache_dir="/tmp"
|
| 18 |
)
|
|
|
|
| 19 |
df = pd.read_excel(file_path, sheet_name="HSKH")
|
| 20 |
df = df.fillna("")
|
| 21 |
|
| 22 |
-
# ✅
|
| 23 |
-
df.columns = [
|
| 24 |
|
| 25 |
return {
|
| 26 |
"columns": df.columns.tolist(),
|
|
|
|
| 16 |
token=HF_TOKEN,
|
| 17 |
cache_dir="/tmp"
|
| 18 |
)
|
| 19 |
+
|
| 20 |
df = pd.read_excel(file_path, sheet_name="HSKH")
|
| 21 |
df = df.fillna("")
|
| 22 |
|
| 23 |
+
# ✅ Làm sạch tiêu đề cột: bỏ xuống dòng và khoảng trắng dư
|
| 24 |
+
df.columns = [str(col).replace("\n", " ").strip() for col in df.columns]
|
| 25 |
|
| 26 |
return {
|
| 27 |
"columns": df.columns.tolist(),
|