> ## 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.

# Session.read_csv()

> Session.read\_csv(\
>
>     *path*: Path | [str](https://docs.python.org/3/builtins/stdtypes.html#str),\
>
>     /,\
>
>     \*,\
>
>     *array\_separator*: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *client\_side\_encryption*: [ClientSideEncryptionConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.ClientSideEncryptionConfig.md#atoti.ClientSideEncryptionConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *columns*: Mapping\[[str](https://docs.python.org/3/builtins/stdtypes.html#str), ColumnName] | Sequence\[ColumnName] = `frozendict({})`,\
>
>     *data\_types*: Mapping\[ColumnName, DataType] = `frozendict({})`,\
>
>     *date\_patterns*: Mapping\[ColumnName, [str](https://docs.python.org/3/builtins/stdtypes.html#str)] = `frozendict({})`,\
>
>     *default\_values*: Mapping\[ColumnName, Constant | [None](https://docs.python.org/3/builtins/constants.html#None)] = `frozendict({})`,\
>
>     *encoding*: [str](https://docs.python.org/3/builtins/stdtypes.html#str) = `'utf-8'`,\
>
>     *keys*: AbstractSet\[ColumnName] | Sequence\[ColumnName] = `frozenset({})`,\
>
>     *partitioning*: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *process\_quotes*: [bool](https://docs.python.org/3/builtins/functions.html#bool) | [None](https://docs.python.org/3/builtins/constants.html#None) = `True`,\
>
>     *separator*: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [None](https://docs.python.org/3/builtins/constants.html#None) = `','`,\
>
>     *table\_name*: TableName,\
>
>     *true\_values*: AbstractSet\[Any] = `frozenset({})`,\
>
>     *false\_values*: AbstractSet\[Any] = `frozenset({})`,\
>
>     *\*\*kwargs*: Unpack\[\_ReadCsvPrivateParameters],\
>
> ) → [Table](./atoti.Table#atoti.Table)

Read a CSV file into a table.

> [!NOTE]
>
> This is just a shortcut for:
>
> ```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
> csv_load = tt.CsvLoad(path, ...)
> data_types = session.tables.infer_data_types(csv_load)
> table = session.create_table(
>     table_name,
>     data_types={**inferred_data_types, **data_types},
>     default_values=...,
>     keys=...,
>     partitioning=...,
> )
> table.load(csv_load)
> ```
>
> The longer variant can be refactored to move the [`load()`](./atoti.Table.load#atoti.Table.load) call inside a [`data_transaction()`](./atoti.Tables.data_transaction#atoti.tables.Tables.data_transaction).

### Parameters

#### *path*

See [`atoti.CsvLoad.path`](./atoti.data_load.CsvLoad#atoti.CsvLoad.path).

#### *array\_separator*

See [`atoti.CsvLoad.array_separator`](./atoti.data_load.CsvLoad#atoti.CsvLoad.array_separator).

#### *client\_side\_encryption*

See [`atoti.CsvLoad.client_side_encryption`](./atoti.data_load.CsvLoad#atoti.CsvLoad.client_side_encryption).

#### *columns*

See [`atoti.CsvLoad.columns`](./atoti.data_load.CsvLoad#atoti.CsvLoad.columns).

#### *data\_types*

The data types for some or all columns of the table.
Data types for non specified columns will be inferred from the first 1,000 lines.

#### *date\_patterns*

See [`atoti.CsvLoad.date_patterns`](./atoti.data_load.CsvLoad#atoti.CsvLoad.date_patterns).

#### *default\_values*

See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *default\_values*.

#### *encoding*

See [`atoti.CsvLoad.encoding`](./atoti.data_load.CsvLoad#atoti.CsvLoad.encoding).

#### *keys*

See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *keys*.

#### *partitioning*

See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *partitioning*.

#### *process\_quotes*

See [`atoti.CsvLoad.process_quotes`](./atoti.data_load.CsvLoad#atoti.CsvLoad.process_quotes).

#### *separator*

See [`atoti.CsvLoad.separator`](./atoti.data_load.CsvLoad#atoti.CsvLoad.separator).

#### *table\_name*

See [`create_table()`](./atoti.Session.create_table#atoti.Session.create_table)’s *name*.

#### *true\_values*

See [`atoti.CsvLoad.true_values`](./atoti.data_load.CsvLoad#atoti.CsvLoad.true_values).

#### *false\_values*

See [`atoti.CsvLoad.false_values`](./atoti.data_load.CsvLoad#atoti.CsvLoad.false_values).
