> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# atoti.Table.load_async()

#### *async* Table.load\_async(data, /)

Load data into the table asynchronously.

This is a non-blocking operation allowing to load data into one or more tables concurrently.

* **Parameters:**
  **data** ([*Table*](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table) *|* [*DataFrame*](https://pandas.pydata.org/pandas-docs/version/2.3/reference/api/pandas.DataFrame.html#pandas.DataFrame) *|* [*DataLoad*](./atoti.data_load.data_load#atoti.data_load.DataLoad)) – The data to load.
* **Return type:**
  None

### Example

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> table = session.create_table(
...     "Example",
...     data_types={"key": "int", "value": "int"},
...     keys={"key"},
... )
>>> df_1 = pd.DataFrame({"key": [1, 2], "value": [10, 20]})
>>> df_2 = pd.DataFrame({"key": [3, 4], "value": [30, 40]})
>>> df_3 = pd.DataFrame({"key": [2, 5], "value": [200, 500]})
```

Loading two DataFrames concurrently:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> import asyncio
>>> async def load_df_1_and_2_concurrently(table):
...     await asyncio.gather(
...         table.load_async(df_1),
...         table.load_async(df_2),
...     )
>>> asyncio.run(load_df_1_and_2_concurrently(table))
>>> table.head().sort_index()
     value
key
1       10
2       20
3       30
4       40
>>> table.drop()
```

Loading two DataFrames sequentially:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> async def load_df_1_and_3_sequentially(table):
...     await table.load_async(df_1)
...     assert table.row_count == 2
...     await table.load_async(df_3)
...     assert table.row_count == 3, (
...         "df_3 should have overrode key `1` of df_1"
...     )
>>> asyncio.run(load_df_1_and_3_sequentially(table))
>>> table.head().sort_index()
     value
key
1       10
2      200
5      500
>>> table.drop()
```

Loading three DataFrames in a concurrent and sequential mix:

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> async def load_df_1_and_3_sequentially_bis(table):
...     await table.load_async(df_1)
...     assert table.row_count >= 2
...     await table.load_async(df_3)
...     assert table.row_count >= 3
>>> async def load_df_2(table):
...     await table.load_async(df_2)
...     assert table.row_count >= 2
>>> async def load_all(table):
...     await asyncio.gather(
...         load_df_1_and_3_sequentially_bis(table),
...         load_df_2(table),
...     )
...     assert table.row_count == 5
>>> asyncio.run(load_all(table))
>>> table.head().sort_index()
     value
key
1       10
2      200
3       30
4       40
5      500
```

<Callout icon="link">
  **See also**:
  [`load()`](./atoti.Table.load#atoti.Table.load) and [`data_transaction()`](./atoti.tables.Tables.data_transaction#atoti.tables.Tables.data_transaction).
</Callout>
