civis.io.file_to_dataframe
- civis.io.file_to_dataframe(file_id, compression='infer', client=None, **read_kwargs)[source]
Load a
DataFramefrom a CSV stored in a Civis FileThe
DataFramewill be read directly from Civis without copying the CSV to a local file on disk.- Parameters:
- file_idint
ID of a Civis File which contains a CSV
- compressionstr, optional
If “infer”, set the
compressionargument ofpandas.read_csvbased on the file extension of the name of the Civis File. Otherwise pass this argument topandas.read_csv.- client
civis.APIClient, optional If not provided, an
civis.APIClientobject will be created from theCIVIS_API_KEY.- **read_kwargs
Additional arguments will be passed directly to
read_csv().
- Returns:
DataFramecontaining the contents of the CSV
- Raises:
- ImportError
If
pandasis not available
See also