-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
python api feedbackFeedback for the Python Client APIFeedback for the Python Client API
Milestone
Description
Returning a series of lists from the api does not add much benefit to the user.
Example
# get state dcids
state_dcids = dc.get_places_in(pd.Series(['country/USA']), 'State')[0]
# get state names
state_names = dc.get_property_values(pd.Series(state_dcids), 'name')
# naive user tries to use boolean mask to find the state alabama
state_names[state_names == ['Alabama']] # failure since series are supposed to be 1dPandas series are designed to be a 1-d array so using them to store multidimensional data may throw some people off. A user can transform a list of lists to a pandas series easily if they want. The intended use case of returning pandas series was to support column assignment in dataframes. But lists of lists can be used to create dataframe columns without any conversion to a pandas series.
I suspect the majority of operations performed on the returned series will be iterating and indexing which lists support.
Metadata
Metadata
Assignees
Labels
python api feedbackFeedback for the Python Client APIFeedback for the Python Client API