UDST / orca

Python library for task orchestration
https://udst.github.io/orca/
BSD 3-Clause "New" or "Revised" License
53 stars 21 forks source link

Passing to_frame() a single string no longer works #27

Closed pksohn closed 7 years ago

pksohn commented 7 years ago

Just realized that DataFrameWrapper.to_frame(columns='string') no longer works as of #7. I'm pretty sure that passing a single string like this was never an intended use, based on the docstring:

columns : sequence, optional
    Sequence of the column names desired in the DataFrame.
    If None all columns are returned, including registered columns.

Nevertheless, this must have broken at least some use cases, since passing a string is so intuitive, and it used to work, e.g. df = orca.get_table('parcels').to_frame('parcel_id'). I suggest that we explicitly allow strings OR sequences to be passed here (to make the unofficial backward compatibility official) and add a test case for this.