datawrangler.zoo.array#

datawrangler.zoo.array.is_array(x)[source]#

Return True if and only if is an Array, or a file that can be loaded into an Array.

Parameters

x – an object, file path or URL

Returns

whether (or not) x is an array (or if it points to an array)

datawrangler.zoo.array.wrangle_array(data, return_model=False, **kwargs)[source]#

Turn an Array into a Pandas DataFrame

Parameters
  • data – an Array (or path to an Array)

  • return_model – if True, return a function for casting an Array into a DataFrame (along with the resulting DataFrame). Default: False

  • kwargs

    a list of keyword arguments: - ‘model’: a callable function or constructor, or a dictionary containing the following keys:

    • ’model’: a callable function or constructor

    • ’args’: a list of arguments to pass to the function (in addition to data)

    • ’kwargs’: a list of keyword arguments to pass to the function

    default: pandas.DataFrame

    • all other keyword arguments are passed to the model (or constructor). These can be used to change how the DataFrame is created (e.g., passing columns=[‘one’, ‘two’, ‘three’] will change the column names of the resulting DataFrame, assuming the “model” is pandas.DataFrame).

Returns

The resulting DataFrame