Skip to content

Commit

Permalink
fix col rede br_inep_censo_escolar.turma
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeddro committed Apr 4, 2024
1 parent ba0bf98 commit 9207d26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cluster_by="sigla_uf",
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(sigla_uf as string) sigla_uf,
Expand Down
8 changes: 8 additions & 0 deletions models/br_inep_censo_escolar/code/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@

bq_storage_cols_order = [i["name"] for i in bq_cols["columns"]]

df["rede"].unique() # type: ignore

df["rede"] = df["rede"].replace( # type: ignore
{"1": "federal", "2": "estadual", "3": "municipal", "4": "privada"}
)

df["rede"].unique() # type: ignore

for keys, df_split in df.groupby(partitions):
ano, sigla_uf = keys # type: ignore
path = os.path.join(OUTPUT, f"ano={ano}", f"sigla_uf={sigla_uf}")
Expand Down

0 comments on commit 9207d26

Please sign in to comment.