Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.36 KB

io.rst

File metadata and controls

57 lines (41 loc) · 1.36 KB

Data Import and Export

The civis.io namespace provides several functions for moving data in and out of Civis.

Tables

Often, your data will be in structured format like a table in a relational database, a CSV or a dataframe. The following functions handle moving structured data to and from Civis. When using these functions, it is recommended to have pandas installed and to pass use_pandas=True in the appropriate functions. If pandas is not installed, data returned from Civis will all be treated as strings.

civis.io

civis_to_csv csv_to_civis dataframe_to_civis read_civis read_civis_sql

Files

These functions will pass flat files to and from Civis. This is useful if you have data stored in binary or JSON format. Any type of file can be stored in platform via the files endpoint.

civis.io

civis_to_file file_to_civis

Databases

These functions move data from one database to another and expose an interface to run SQL in the database. Use ~civis.io.query_civis when you need to execute SQL that does not return data (for example, a GRANT or DROP TABLE statement).

civis.io

transfer_table query_civis