The model Module

index_method(c: str) -> (<class 'str'>, None)[source]
unquote(s: str) str[source]
load_range(n, f) int[source]
csv_reader(data, unquote=True)[source]
class CustomColumn(name, type, extraction_method)[source]
extract_value(input_source)[source]
class Table(metadata_file: Optional[str] = None, get_entry=None, concurrent_indices: bool = False, data_file: Optional[str] = None, column_name_replacement: Optional[Dict] = None)[source]
save(to_dir)[source]
fopen(source)[source]
get_index_ddl(column, method)[source]
add_column(name, type, extraction_method)[source]
make_column(name, type, sql, cursor, index=False, include_in_index=None)[source]
make_fips_column(cursor)[source]
make_iso_column(anchor, cursor, include=None)[source]

Add US State ISO 3166-2 code Source: https://simplemaps.com/data/us-cities

Parameters
  • anchor – existing column to use to calculate state iso code

  • cursor – Database cursor

  • include – Additional data (column) to include in index on the new column

Returns

parse_fips12(cursor)[source]
make_int_column(cursor, source: str, target: str, index: bool)[source]
analyze(entry=None)[source]
create(cursor)[source]
build_indices(cursor, flag: Optional[str] = None)[source]
drop(cursor)[source]
type_from_metadata(c: int) Optional[str][source]
guess_types(rows: list, lines: list)[source]
add_data(cursor, entry)[source]
copy_data(cursor, input_source)[source]
static log_progress(t0, t1, chars, lines, N)[source]