PoolingClient

The PoolingClient object used for fetching information through different API calls, each with different parameters.

egytech_api.core.PoolingClient(pydantic.BaseModel)

Attributes

Name
Type
Description

queries

The list of queries to-be-executed.

Methods

get_df()

Returns a pandas.DataFrame instance of the aggregated participant data from the queries.

Parameters

No parameters

Returns

Type
Description

A pandas.DataFrame instance containing the fetched data as one row per fetched participant.

save_csv(filename: str)

Parameters

Name
Type
Description
Example

filename

str

The name of the .csv file to dump the fetched participant data in (without extension). No extension is needed explicitly as it's added during the file-saving process.

"my_awesome_data"

Returns

None

This method is simply a placeholder for the pandas.DataFrame.to_csv() method. It simply saves the generated pandas.DataFrame instance to a .csv file and excludes the index. You can customize your own function parameters for this by simply calling the get_df() method, and manipulating the resulting pandas.DataFrame as you want.

save_excel(filename: str)

Parameters

Name
Type
Description
Example

filename

str

The name of the .xlsx file to dump the fetched participant data in (without extension). No extension is needed explicitly as it's added during the file-saving process.

"my_awesome_data"

Returns

None

This method is simply a placeholder for the pandas.DataFrame.to_excel() method. It simply saves the generated pandas.DataFrame instance to a .xlsx file and excludes the index. You can customize your own function parameters for this by simply calling the get_df() method, and manipulating the resulting pandas.DataFrame as you want.

This function uses "xlsxwriter" as the excel writer engine by default. Customization is available by calling to_excel() on a pandas.DataFrame instance instead.

Last updated