civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

Improve documentation of input to civis.io.civis_file_to_table #422

Closed jacksonlee-civis closed 2 years ago

jacksonlee-civis commented 2 years ago

The input to the function civis.io.civis_file_to_table has to be Civis file objects that look like CSV files. Although this requirement is at least implicit due to kwargs like delimiter and headers for this function, it is not explicitly stated in the docstring for file_id or the docstring for the function in general:

https://github.com/civisanalytics/civis-python/blob/12f5cbbcd7cd0b8a7ad348534c329bef8cafdf36/civis/io/_tables.py#L913-L920

Update the docstring so that this requirement is explicitly stated. A user just reported they were unable to use this function successfully, and it turned out their input to the function was some sort of JSON records.