CaCu's dummy model in its own folder
This commit is contained in:
@@ -22,6 +22,12 @@ class CohortFileError(ValueError):
|
||||
"""The file isn't a cohort build: its columns or types aren't `SCHEMA`'s."""
|
||||
|
||||
|
||||
def cohort_lineage(path: str | Path) -> dict[str, str]:
|
||||
"""The lineage in the file's metadata, without reading any rows."""
|
||||
metadata = pq.read_metadata(path).metadata
|
||||
return {k.decode(): v.decode() for k, v in metadata.items() if k not in (b"pandas", b"ARROW:schema")}
|
||||
|
||||
|
||||
def read_cohort(path: str | Path) -> pd.DataFrame:
|
||||
"""The build's rows, after checking the file's schema without reading them."""
|
||||
schema = pq.read_schema(path)
|
||||
|
||||
Reference in New Issue
Block a user