Openwithpandas¶
flowtask.components.OpenWithPandas
¶
OpenWithPandas
¶
Bases: OpenWithBase
OpenWithPandas
Overview
Open a file and return a Dataframe type
.. table:: Properties :widths: auto
+-------------+----------+-----------+-------------------------------------------------------+ | Name | Required | Summary | +-------------+----------+-----------+-------------------------------------------------------+ | model | Yes | A model (json) representative of the data that I am going to | | | | open * name of a DataModel (in-development) | +-------------+----------+-----------+-------------------------------------------------------+ | map | Yes | Map the columns against the model | +-------------+----------+-----------+-------------------------------------------------------+ | tablename | Yes | Join the data from the table in the postgres database | +-------------+----------+-----------+-------------------------------------------------------+ | use_map | Yes | If true, then a MAP file is used instead of a table in postgresql | +-------------+----------+-----------+-------------------------------------------------------+ | file_engine | Yes | Pandas different types of engines for different types of Excel | | | | * xlrd (legacy, xls type) | | | | * openpyxl (new xlsx files) | | | | * pyxlsb (to open with macros and functions) | +-------------+----------+-----------+-------------------------------------------------------+ | dtypes | No | force the data type of a column ex: { order_date: datetime } | +-------------+----------+-----------+-------------------------------------------------------+
Return the list of arbitrary days
Example:
```yaml
OpenWithPandas:
mime: text/csv
process: true
separator: '|'
drop_empty: true
trim: true
pk:
columns:
- associate_oid
- associate_id
append: false
verify_integrity: true
map:
tablename: employees
schema: bacardi
map: employees
replace: false
```