---
title: Python Pandas
slug: connectors/python-pandas
docTags: 
createdAt: 2026-06-09T16:29:51.743Z
---

Pandas is a Python library that enables fast, flexible, and expressive data analysis and manipulation of structured data.

Python Pandas is a leading open-source data analysis and manipulation library, widely used for transforming and processing structured data. This connector enables Swimlane Turbine users to seamlessly read, write, and transform Excel files and DataFrames within automated workflows—without writing code. With robust actions for converting between Excel and DataFrame formats, extracting sheet names, and applying advanced formatting, users can automate complex data handling tasks directly in their security playbooks. Integrating Python Pandas with Swimlane Turbine empowers security teams to streamline data enrichment, reporting, and analysis, accelerating decision-making and operational efficiency.

### Limitations

None to date.

### Supported Versions

This Python Pandas Connector uses the version pandas sdk.

### Additional Docs

- [API Documentation](https://pandas.pydata.org/docs/reference/io.html#excel)

## Configuration

### Prerequisites

- Authentication is not Required.

## Capabilities

This Connector provides the following capabilities:

- DataFrame to Excel
- Excel Sheet Names
- ExcelFile
- ExcelFile Book
- ExcelWriter
- Parse Specific Sheet
- Read Excel File
- Styler to an Excel

### DataFrame to Excel

- Converts a DataFrame into an Excel file, allowing data manipulation and analysis within Python Pandas [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_excel.html#pandas.DataFrame.to_excel).

### Excel Sheet Names

- Retrieve a list of sheet names from the specified Excel file using Python Pandas [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.ExcelFile.sheet_names.html#pandas.ExcelFile.sheet_names).

### ExcelFile

- Parse tabular Excel sheets into DataFrame objects for data manipulation and analysis using Python Pandas [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.ExcelFile.html#pandas.ExcelFile).

### ExcelFile Book

- Imports all sheets from an Excel file into a dictionary with sheet names as keys, requiring the 'files' input [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.ExcelFile.book.html#pandas.ExcelFile.book).

### ExcelWriter

- Write DataFrame objects into Excel sheets using Python Pandas, requiring a 'dataframes' input [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.ExcelWriter.html#pandas.ExcelWriter).

### Parse Specific Sheet

- Converts a specified sheet from an Excel file into a dictionary format using Python Pandas [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.ExcelFile.parse.html#pandas.ExcelFile.parse).

### Read Excel File

- Converts an Excel file into a dictionary format for data manipulation and analysis using Python Pandas [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html#pandas.read_excel).

### Styler to an Excel

- Write a Pandas Styler object to an Excel sheet, requiring a specified file as input [Click Here](https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.to_excel.html#pandas.io.formats.style.Styler.to_excel).

# Actions

## DataFrame to Excel

Convert a specified DataFrame into an Excel file for easy data manipulation and analysis using Python Pandas.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name**  | **Type** | **Required** | **Description**                            |
| ------------------ | -------- | ------------ | ------------------------------------------ |
| `dataframe`        | object   | Required     | DataFrame to be written to the Excel file. |
| `input_parameters` | object   | Optional     | Parameters for the Excel file.             |

### Input Example

`{"dataframe":{},"input_parameters":{}}`

### Output

| **Parameter**    | **Type** | **Description**         |
| ---------------- | -------- | ----------------------- |
| `file`           | object   | Output field: file      |
| `file.file`      | string   | Output field: file.file |
| `file.file_name` | string   | Name of the resource    |

### Output Example

`{"file":{"file":"string","file_name":"Example Name"}}`

## Excel Sheet Names

Retrieve all sheet names from an uploaded Excel file using Python Pandas by providing the required file input.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                   |
| ----------------- | -------- | ------------ | --------------------------------------------------------------------------------- |
| `files`           | object   | Required     | Retrieve a list of sheet names from the specified Excel file using Python Pandas. |
| `files.file`      | string   | Optional     | Parameter for Excel Sheet Names                                                   |
| `files.file_name` | string   | Optional     | Name of the resource                                                              |

### Input Example

`{"files":{"file":"string","file_name":"Example Name"}}`

### Output

| **Parameter** | **Type** | **Description**      |
| ------------- | -------- | -------------------- |
| `sheet_names` | array    | Name of the resource |

### Output Example

`{"sheet_names":["Math","Science","English"]}`

## ExcelFile

Convert Excel files into Python Pandas DataFrame objects for streamlined data analysis and manipulation.

### Endpoint

- **Method:** `POST`

### Input

| **Argument Name**  | **Type** | **Required** | **Description**                                                                                           |
| ------------------ | -------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `files`            | object   | Required     | Parse tabular Excel sheets into DataFrame objects for data manipulation and analysis using Python Pandas. |
| `files.file`       | string   | Optional     | Parameter for ExcelFile                                                                                   |
| `files.file_name`  | string   | Optional     | Name of the resource                                                                                      |
| `input_parameters` | object   | Optional     | Parameters for the ExcelFile action                                                                       |

### Input Example

`{"files":{"file":"string","file_name":"Example Name"},"input_parameters":{}}`

### Output

| **Parameter**               | **Type** | **Description**      |
| --------------------------- | -------- | -------------------- |
| `Sheet Names`               | object   | Name of the resource |
| `Sheet Names.Math`          | array    | Name of the resource |
| `Sheet Names.Math.Name`     | string   | Name of the resource |
| `Sheet Names.Math.Score`    | number   | Name of the resource |
| `Sheet Names.Science`       | array    | Name of the resource |
| `Sheet Names.Science.Name`  | string   | Name of the resource |
| `Sheet Names.Science.Score` | number   | Name of the resource |
| `Sheet Names.English`       | array    | Name of the resource |
| `Sheet Names.English.Name`  | string   | Name of the resource |
| `Sheet Names.English.Score` | number   | Name of the resource |

### Output Example

`{"Sheet Names":{"Math":[{},{},{}],"Science":[{},{},{}],"English":[{},{},{}]}}`

## ExcelFile Book

Import all sheets from an Excel file into a dictionary, using each sheet's name as the key. Requires the 'files' input.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                                             |
| ----------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| `files`           | object   | Required     | Imports all sheets from an Excel file into a dictionary with sheet names as keys, requiring the file input. |
| `files.file`      | string   | Optional     | Parameter for ExcelFile Book                                                                                |
| `files.file_name` | string   | Optional     | Name of the resource                                                                                        |

### Input Example

`{"files":{"file":"string","file_name":"Example Name"}}`

### Output

| **Parameter**               | **Type** | **Description**             |
| --------------------------- | -------- | --------------------------- |
| `sheets_data`               | object   | Response data               |
| `sheets_data.Math`          | array    | Response data               |
| `sheets_data.Math.Name`     | string   | Response data               |
| `sheets_data.Math.Score`    | number   | Response data               |
| `sheets_data.Science`       | array    | Response data               |
| `sheets_data.Science.Name`  | string   | Response data               |
| `sheets_data.Science.Score` | number   | Response data               |
| `sheets_data.English`       | array    | Response data               |
| `sheets_data.English.Name`  | string   | Response data               |
| `sheets_data.English.Score` | number   | Response data               |
| `total_sheets`              | number   | Output field: total\_sheets |

### Output Example

`{"sheets_data":{"Math":[{},{},{}],"Science":[{},{},{}],"English":[{},{},{}]},"total_sheets":3}`

## ExcelWriter

Write DataFrame objects to Excel sheets using Python Pandas, requiring a 'dataframes' input for successful operation.

### Endpoint

- **Method:** `POST`

### Input

| **Argument Name**  | **Type** | **Required** | **Description**                                     |
| ------------------ | -------- | ------------ | --------------------------------------------------- |
| `dataframes`       | array    | Required     | List of DataFrames to be written to the Excel file. |
| `input_parameters` | object   | Optional     | Parameters for the Excel file.                      |

### Input Example

`{"dataframes":[],"input_parameters":{}}`

### Output

| **Parameter**    | **Type** | **Description**         |
| ---------------- | -------- | ----------------------- |
| `file`           | object   | Output field: file      |
| `file.file`      | string   | Output field: file.file |
| `file.file_name` | string   | Name of the resource    |

### Output Example

`{"file":{"file":"string","file_name":"Example Name"}}`

## Parse Specific Sheet

Convert a specified sheet from an uploaded Excel file into a dictionary format using Python Pandas by providing the file and sheet name.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                             |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `files`           | object   | Required     | Converts a specified sheet from an Excel file into a dictionary format using Python Pandas. |
| `files.file`      | string   | Optional     | Parameter for Parse Specific Sheet                                                          |
| `files.file_name` | string   | Optional     | Name of the resource                                                                        |
| `sheet_name`      | string   | Required     | The name of the sheet to be parsed from the Excel file.                                     |

### Input Example

`{"sheet_name":"Math"}`

### Output

| **Parameter** | **Type** | **Description**       |
| ------------- | -------- | --------------------- |
| `Name`        | object   | Name of the resource  |
| `Name.0`      | string   | Name of the resource  |
| `Name.1`      | string   | Name of the resource  |
| `Name.2`      | string   | Name of the resource  |
| `Score`       | object   | Score value           |
| `Score.0`     | number   | Output field: Score.0 |
| `Score.1`     | number   | Output field: Score.1 |
| `Score.2`     | number   | Output field: Score.2 |

### Output Example

`{"Name":{"0":"Alice","1":"Bob","2":"Charlie"},"Score":{"0":95,"1":88,"2":72}}`

## Read Excel File

Convert an Excel file into a dictionary format for data manipulation and analysis using Python Pandas, requiring the 'files' input.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                                                                             |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------------------- |
| `files`           | object   | Required     | Converts a specified sheet from an Excel file into a dictionary format using Python Pandas. |
| `files.file`      | string   | Optional     | Parameter for Read Excel File                                                               |
| `files.file_name` | string   | Optional     | Name of the resource                                                                        |
| `file_inputs`     | object   | Optional     | File inputs to be used in the action.                                                       |

### Input Example

`{"files":{"file":"string","file_name":"Example Name"},"file_inputs":{}}`

### Output

| **Parameter** | **Type** | **Description**       |
| ------------- | -------- | --------------------- |
| `Name`        | object   | Name of the resource  |
| `Name.0`      | string   | Name of the resource  |
| `Name.1`      | string   | Name of the resource  |
| `Name.2`      | string   | Name of the resource  |
| `Score`       | object   | Score value           |
| `Score.0`     | number   | Output field: Score.0 |
| `Score.1`     | number   | Output field: Score.1 |
| `Score.2`     | number   | Output field: Score.2 |

### Output Example

`{"Name":{"0":"Alice","1":"Bob","2":"Charlie"},"Score":{"0":95,"1":88,"2":72}}`

## Styler to an Excel

Write a Pandas Styler object to an Excel sheet using the specified input file.

### Endpoint

- **Method:** `GET`

### Input

| **Argument Name** | **Type** | **Required** | **Description**                            |
| ----------------- | -------- | ------------ | ------------------------------------------ |
| `newdataframe`    | object   | Optional     | New Sheet to be created in the Excel file. |
| `files`           | object   | Required     | Existing Excel file to be modified.        |
| `files.file`      | string   | Optional     | Parameter for Styler to an Excel           |
| `files.file_name` | string   | Optional     | Name of the resource                       |
| `sheet_inputs_1`  | object   | Optional     | Inputs for the any one of existing sheet.  |
| `sheet_inputs_2`  | object   | Optional     | Inputs for the new sheet.                  |

### Input Example

`{"newdataframe":{},"files":{"file":"string","file_name":"Example Name"},"sheet_inputs_1":{},"sheet_inputs_2":{}}`

### Output

| **Parameter**    | **Type** | **Description**         |
| ---------------- | -------- | ----------------------- |
| `file`           | object   | Output field: file      |
| `file.file`      | string   | Output field: file.file |
| `file.file_name` | string   | Name of the resource    |

### Output Example

`{"file":{"file":"string","file_name":"Example Name"}}`

# Response Headers

| **Header**   | **Description**                                       | **Example**                   |
| ------------ | ----------------------------------------------------- | ----------------------------- |
| Content-Type | The media type of the resource                        | application/json              |
| Date         | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
