Skip to content

Commit

Permalink
Bump polars version to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismostert committed Jul 2, 2024
1 parent d78a064 commit 3e55887
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 82 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "pypi"

[packages]
defusedxml = "0.7.1"
polars = "0.20.3"
polars = "1.0.0"

[dev-packages]
pytest = "*"
Expand Down
156 changes: 78 additions & 78 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions src/neighbourhood.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,15 @@ def from_path(str_path: Optional[str]) -> Optional["NeighbourhoodData"]:
data = pl.scan_parquet(path)
else:
return None
except Exception:
return None

if data.columns != ["zip_code", "neighbourhood_code", "ambiguous"]:
if data.collect_schema().names() != [
"zip_code",
"neighbourhood_code",
"ambiguous",
]:
return None

except Exception:
return None

return NeighbourhoodData(data=data)

0 comments on commit 3e55887

Please sign in to comment.