Spaces:
Running
Running
Commit ·
f409fe8
1
Parent(s): d967f3f
added new data
Browse files- data_sync.py +3 -2
data_sync.py
CHANGED
|
@@ -46,7 +46,8 @@ def sync_dataframe(df: pd.DataFrame, table_name: str) -> None:
|
|
| 46 |
df.columns = new_cols
|
| 47 |
|
| 48 |
df.to_sql(table_name, engine, if_exists="replace", index=False)
|
| 49 |
-
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
def sync_excel(filepath: str) -> None:
|
|
@@ -93,7 +94,7 @@ def main() -> None:
|
|
| 93 |
print(f"Path not found: {target}")
|
| 94 |
sys.exit(1)
|
| 95 |
|
| 96 |
-
print("\
|
| 97 |
|
| 98 |
|
| 99 |
if __name__ == "__main__":
|
|
|
|
| 46 |
df.columns = new_cols
|
| 47 |
|
| 48 |
df.to_sql(table_name, engine, if_exists="replace", index=False)
|
| 49 |
+
# Use plain ASCII characters to avoid Windows console encoding issues
|
| 50 |
+
print(f" Table '{table_name}' synced - {len(df)} rows, {len(df.columns)} columns")
|
| 51 |
|
| 52 |
|
| 53 |
def sync_excel(filepath: str) -> None:
|
|
|
|
| 94 |
print(f"Path not found: {target}")
|
| 95 |
sys.exit(1)
|
| 96 |
|
| 97 |
+
print("\nData sync complete.")
|
| 98 |
|
| 99 |
|
| 100 |
if __name__ == "__main__":
|