# PoolingClient

## `egytech_api.core.PoolingClient(`[`pydantic.BaseModel`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel)`)`

## Attributes

<table data-full-width="false"><thead><tr><th width="104">Name</th><th width="262">Type</th><th>Description</th></tr></thead><tbody><tr><td>queries</td><td>list[<a href="https://abdulrahman-mustafa.gitbook.io/egytech-fyi-python-wrapper/reference/api-reference/participantsqueryparams">ParticipantsQueryParams</a>]</td><td>The list of queries to-be-executed.</td></tr></tbody></table>

{% hint style="danger" %}
Note: There is nothing to guarantee that the fetched participants via this object don't have duplicates. It's up to you to use this data and infer from it at your own risk.

Example:&#x20;

Query 1: Participants whose companies work on B2B solutions and have a cs degree.

Query 2: Females who work in front-end and have a cs degree.

Among these 2 queries, a female could fulfill both sets of criteria. The wrapper doesn't currently implement safeguards to prevent duplicates in query results.
{% endhint %}

## Methods

### `get_df()`

Returns a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) instance of the aggregated participant data from the queries.

#### Parameters

No parameters

#### Returns

<table><thead><tr><th width="231">Type</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html"><code>pandas.DataFrame</code></a></td><td>A <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html"><code>pandas.DataFrame</code></a> instance containing the fetched data as one row per fetched participant.</td></tr></tbody></table>

### `save_csv(filename: str)`

#### Parameters

<table><thead><tr><th width="116">Name</th><th width="84">Type</th><th width="311">Description</th><th>Example</th></tr></thead><tbody><tr><td>filename</td><td><code>str</code></td><td>The name of the <code>.csv</code> file to dump the fetched participant data in <strong>(without extension)</strong>. No extension is needed explicitly as it's added during the file-saving process.</td><td>"my_awesome_data"</td></tr></tbody></table>

#### Returns

`None`

{% hint style="info" %}
This method is simply a placeholder for the [`pandas.DataFrame.to_csv()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html) method. It simply saves the generated [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) instance to a `.csv` file and excludes the index. You can customize your own function parameters for this by simply calling the [`get_df()`](https://abdulrahman-mustafa.gitbook.io/egytech-fyi-python-wrapper/reference/api-reference/poolingclient#get_df) method, and manipulating the resulting [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) as you want.
{% endhint %}

### `save_excel(filename: str)`

#### Parameters

<table><thead><tr><th width="116">Name</th><th width="84">Type</th><th width="311">Description</th><th>Example</th></tr></thead><tbody><tr><td>filename</td><td><code>str</code></td><td>The name of the <code>.xlsx</code> file to dump the fetched participant data in <strong>(without extension)</strong>. No extension is needed explicitly as it's added during the file-saving process.</td><td>"my_awesome_data"</td></tr></tbody></table>

#### Returns

`None`

{% hint style="info" %}
This method is simply a placeholder for the [`pandas.DataFrame.to_excel()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_excel.html#) method. It simply saves the generated [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) instance to a `.xlsx` file and excludes the index. You can customize your own function parameters for this by simply calling the [`get_df()`](https://abdulrahman-mustafa.gitbook.io/egytech-fyi-python-wrapper/reference/api-reference/poolingclient#get_df) method, and manipulating the resulting [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) as you want.
{% endhint %}

{% hint style="info" %}
This function uses `"xlsxwriter"` as the excel writer engine by default. Customization is available by calling [`to_excel()`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_excel.html) on a [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) instance instead.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://abdulrahman-mustafa.gitbook.io/egytech-fyi-python-wrapper/reference/api-reference/poolingclient.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
