tables

module of dascore.utils source

Utilities for reading strict CSV tables.

Read cells as text and reject rows whose width differs from the header. Callers interpret cell values without pandas type inference.

Errors raise ParameterError and identify the file with quote_path. Formats wrap these errors at their table-reading boundary.

Functions

Name Description
drop_private_columns Drop columns whose names begin with an underscore.
ordered_rows Return the rows in the order the named column states, if any.
parquet_table Convert a dataframe to a parquet table without writing it.
parse_cell Read a cell’s value the way its own text states it.
read_parquet Read one parquet file, and whatever it states about itself.
read_parquet_metadata Return what a parquet file states about itself, reading no rows.
read_table Read one strict CSV table.
require_columns Reject tables missing required columns.
require_stated Reject blank cells in required columns.
row_cells Return a row’s stated cells, an empty one meaning unset.
write_parquet Write a dataframe as one parquet file, keeping the values it holds.
write_parquet_table Write a prepared parquet table, as parquet_table returns it.