Spaces:
Sleeping
Sleeping
Update sozo_gen.py
Browse files- sozo_gen.py +1 -1
sozo_gen.py
CHANGED
|
@@ -38,7 +38,7 @@ if not API_KEY:
|
|
| 38 |
# --- Helper Functions ---
|
| 39 |
def load_dataframe_safely(buf, name: str):
|
| 40 |
ext = Path(name).suffix.lower()
|
| 41 |
-
df = (pd.read_excel if ext in (".xlsx", ".xls") else pd.read_csv)(buf)
|
| 42 |
df.columns = df.columns.astype(str).str.strip()
|
| 43 |
df = df.dropna(how="all")
|
| 44 |
if df.empty or len(df.columns) == 0: raise ValueError("No usable data found")
|
|
|
|
| 38 |
# --- Helper Functions ---
|
| 39 |
def load_dataframe_safely(buf, name: str):
|
| 40 |
ext = Path(name).suffix.lower()
|
| 41 |
+
df = (pd.read_excel if ext in (".xlsx", ".xls") else pd.read_csv)(buf)
|
| 42 |
df.columns = df.columns.astype(str).str.strip()
|
| 43 |
df = df.dropna(how="all")
|
| 44 |
if df.empty or len(df.columns) == 0: raise ValueError("No usable data found")
|