module datasource.convert
¶
Short summary¶
module pyensae.datasource.convert
Various conversion functions.
Functions¶
function |
truncated documentation |
---|---|
converts a dBase file into a list of dataframe (one per table) |
|
Put all rows from a dBase database into sqlite Add a dbase table to an open sqlite database. |
Documentation¶
Various conversion functions.
- pyensae.datasource.convert.dBase2df(file, encoding='cp437')¶
converts a dBase file into a list of dataframe (one per table)
- Parameters:
file – file name
encoding – table encoding
- Returns:
list of dataframes (pandas)
The module relies on dbfread.
- pyensae.datasource.convert.dBase2sqllite(db, table, encoding='cp437', overwrite_table=None, fLOG=<function noLOG>)¶
Put all rows from a dBase database into sqlite
Add a dbase table to an open sqlite database.
- Parameters:
db – cursor on SQLite or file name
table – DBF object or filename
encoding – encoding if table is a filename
overwrite_table – overwrite the table name
fLOG – logging function, to see the progress
The table will be removed if it exists.