Created
January 16, 2026 11:37
-
-
Save snorkysnark/b10212cc25845f6e23d951bf763b7e5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| from sqlalchemy import Numeric, create_engine | |
| engine = create_engine("sqlite:///arwu.sqlite") | |
| def upload_table(table, name, conn): | |
| dtypes = {} | |
| for col in table.columns: | |
| if str(table.dtypes[col]) == "float64": | |
| dtypes[col] = Numeric(10, 3) | |
| table.to_sql(name, conn, dtype=dtypes, index=False) | |
| t1 = pd.read_excel("/home/lisk2/ARWU 2025 edited.xlsx") | |
| upload_table(t1, "arwu_2025", engine) | |
| t2 = pd.read_excel( | |
| "/home/lisk2/2025_2012_ARWU_WUR_с_раcчетными_позициями.xlsx", sheet_name="ARWU" | |
| ) | |
| upload_table(t2, "arwu_wur_2025_2012", engine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment