Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 0428c45

Browse files
committed
feat: improve python code
1 parent a2c822d commit 0428c45

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
numpy==1.26.4
2+
openpyxl==3.1.2
3+
pandas==2.2.2

src/utils/format/convert.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pandas as pd
2-
3-
def read_and_save_csv(input_path, output_path):
4-
df = pd.read_csv(input_path, encoding='utf-8')
5-
df.to_excel(output_path, index=False)
1+
def to_excel(input_path: str, output_path: str):
2+
import pandas as pd
3+
pd.read_csv(input_path, encoding='utf-8').to_excel(output_path, index=False)

0 commit comments

Comments
 (0)