gooddata_pandas.good_pandas.GoodPandas

class gooddata_pandas.good_pandas.GoodPandas(host: str, token: str, headers_host: Optional[str] = None, **custom_headers_: Optional[str])

Bases: object

Facade to access factories that create pandas Series and DataFrames using analytics computed by GoodData.CN.

__init__(host: str, token: str, headers_host: Optional[str] = None, **custom_headers_: Optional[str]) None

Initializes GoodPandas instance.

Args:

host (str): Host for GoodDataSdk. token (str): Token for GoodDataSdk. headers_host (Optional[str]): Host header, if needed. **custom_headers_ (Optional[str]): Additional headers for GoodDataSdk.

Methods

__init__(host, token[, headers_host])

Initializes GoodPandas instance.

create_from_profile([profile, profiles_path])

Creates GoodPandas instance from a given profile.

data_frames(workspace_id)

Creates factory for constructing pandas.DataFrame bound to a workspace.

series(workspace_id)

Creates factory for constructing pandas.Series bound to a workspace.

Attributes

sdk

Retrieves GoodDataSdk instance.

classmethod create_from_profile(profile: str = 'default', profiles_path: Path = PosixPath('/home/docs/.gooddata/profiles.yaml')) GoodPandas

Creates GoodPandas instance from a given profile.

Args:

profile (str): Name of the profile to use. Defaults to “default”. profiles_path (Path): Path to the profiles file. Defaults to PROFILES_FILE_PATH.

Returns:

GoodPandas: A new GoodPandas instance with the settings from the profile.

data_frames(workspace_id: str) DataFrameFactory

Creates factory for constructing pandas.DataFrame bound to a workspace.

Args:

workspace_id (str): ID of the workspace the factory will be bound to.

Returns:

DataFrameFactory: Same instance for a given workspace.

property sdk: GoodDataSdk

Retrieves GoodDataSdk instance.

Returns:

GoodDataSdk: The internal GoodDataSdk instance.

series(workspace_id: str) SeriesFactory

Creates factory for constructing pandas.Series bound to a workspace.

Args:

workspace_id (str): ID of the workspace the factory will be bound to.

Returns:

SeriesFactory: Same instance for a given workspace.