> ## 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.Session.read_pandas()

#### Session.read\_pandas(dataframe, /, \*, data\_types=frozendict(\{}), default\_values=frozendict(\{}), keys=frozenset(\{}), partitioning=None, table\_name)

Read a pandas DataFrame into a table.

<Note>
  This is just a shortcut for:

  ```python theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
  inferred_data_types = session.tables.infer_data_types(dataframe)
  table = session.create_table(
      table_name,
      data_types={**inferred_data_types, **data_types},
      default_values=...,
      keys=...,
      partitioning=...,
  )
  table.load(dataframe)
  ```

  The longer variant can be refactored to move the [`load()`](./atoti.Table.load#atoti.Table.load) call inside a [`data_transaction()`](./atoti.tables.Tables.data_transaction#atoti.tables.Tables.data_transaction).
</Note>

All the named indices of the DataFrame are included into the table.
Multilevel columns are flattened into a single string name.

* **Parameters:**
  * **data\_types** (*Mapping* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *DataType* *]*) – Data types for some or all columns of the table.
    Data types for non specified columns will be inferred from the dataframe dtypes.
  * **dataframe** (*pd.DataFrame*) – The DataFrame to load.
  * **default\_values** (*Mapping* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *,* *Constant* *|* *None* *]*) – See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *default\_values*.
  * **keys** (*AbstractSet* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*  *|* *Sequence* *\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str) *]*) – See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *keys*.
  * **partitioning** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *|* *None*) – See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *partitioning*.
  * **table\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *name*.
* **Return type:**
  [Table](./atoti.table#atoti.Table)
