Table.to_stata
Table.to_stata(max_results=None, *, variables=None, progress=True, batch_preprocessor=None, geography_variable="", max_parallelization=os.cpu_count()) → void
Loads the table's contents and metadata into the current Stata session. Stata must be installed and activated for this to work — generally, this method should only be called from within a Stata Redivis notebook.
Parameters:
max_results : int, default None
The maximum number of rows to load. If not specified, all rows in the table will be loaded.
variables : list<str>, default None
A list of variable names to read, improving performance when not all variables are needed. If unspecified, all variables will be represented in the returned rows. Variable names are case-insensitive, though the names in the results will reflect the variable's true casing. The order of the columns returned will correspond to the order of names in this list.
progress : bool, default True
Whether to show a progress bar.
batch_preprocessor : function, default None
Function used to preprocess the data, invoked for each batch of records as they are initially loaded. This can be helpful in reducing or processing the data before being it is loaded. The function accepts one argument, a pyarrow.RecordBatch, and must return a pyarrow.RecordBatch or None. If you prefer to work with the data solely in a streaming manner, see Table.to_arrow_batch_iterator()
geography_variable : str, optional
If the table contains a variable of type geography, it will by default be loaded via the mapimport proc in SAS. If there are multiple geography variables in your table (uncommon), you must specify this parameter to choose which of these variables is the geography field. To bypass the default behavior and load the table as a standard dataset, set geography_varibale=None .
max_parallelization : int, default os.cpu_count()
The maximum number of threads utilized when loading the table.
Returns:
void
Last updated
Was this helpful?

