Skip to content

XptReadOptions(encoding=Encoding.UTF_8, column_names=ColumnNames.CLEANED) Source

Settings of a SAS transport (XPT) file (.xpt) read by Table.from_xpt.

These files are read only.

The example reads paxraw_d_short.xpt, a SAS transport file of 100 rows.

Added in version 0.1.0

Parameters:

Raises:

Examples:

import numdaplot as ndp

latin_1 = ndp.XptReadOptions(encoding=ndp.Encoding.LATIN_1)
activity = ndp.Table.from_xpt("paxraw_d_short.xpt", latin_1)
activity.row_count
# 100
activity.column_names
# ['SEQN', 'PAXSTAT', 'PAXCAL', 'PAXDAY', 'PAXN', 'PAXHOUR', 'PAXMINUT', 'PAXINTEN', 'PAXSTEP']