Framework for Python

Saving Work

save_table()

Save a table to the tables output folder.

Usage

save_table(
    data: pd.DataFrame,
    name: str,
    format: str = 'csv',
    public: bool = False,
    overwrite: bool = True,
    **kwargs: Any,
) -> Path

Arguments

Name Type Default Description
data required pd.DataFrame

The table.

name required str

File name without extension.

format str 'csv'

"csv", "parquet", or "xlsx" (needs the excel extra).

public bool False

In a sensitive project, save to the public tables folder.

overwrite bool True

Replace an existing file.

**kwargs Any

Passed to the pandas writer.

Value

The saved file.