Save
- class optimus.engines.base.io.save.BaseSave(root: DataFrameType)[source]
- csv(path, *args, **kwargs)[source]
Save data frame to a CSV file. :param path: path where the spark will be saved. :param mode: ‘rb’, ‘wt’, etc it uses the default value. :return: Dataframe in a CSV format in the specified path.
- excel(path, mode='w', *args, **kwargs)[source]
Save data frame to a CSV file. :param path: File path or object :param mode: Python write mode, default ‘w’. it uses the default value. :return: Dataframe in a CSV format in the specified path.
- json(path, *args, **kwargs)[source]
Save data frame in a json file :param path: path where the spark will be saved. :param mode: Specifies the behavior of the save operation when data already exists.
“append”: Append contents of this DataFrame to existing data. “overwrite” (default case): Overwrite existing data. “ignore”: Silently ignore this operation if data already exists. “error”: Throw an exception if data already exists.
- Parameters
num_partitions – the number of partitions of the DataFrame
- Returns
- parquet(path, mode='w', num_partitions=1, *args, **kwargs)[source]
Save data frame to a parquet file :param path: File path or object :param mode: Specifies the behavior of the save operation when data already exists.
“append”: Append contents of this DataFrame to existing data. “overwrite” (default case): Overwrite existing data. “ignore”: Silently ignore this operation if data already exists. “error”: Throw an exception if data already exists.
- Parameters
num_partitions – the number of partitions of the DataFrame
- Returns