oxen.df_utils

The df_utils module provides a consistent interface for loading data frames and saving them to disk.

Supported types: csv, parquet, json, jsonl, arrow

Example usage:

import os
from oxen import df_utils

# load a data frame
df = df_utils.load("path/to/data.csv")

# save a data frame
df_utils.save(df, "path/to/save.csv")

load_df_call Objects

class load_df_call()

Reads a file into a data frame. The file format is inferred from the file extension.

Supported types: csv, parquet, json, jsonl, arrow

load

def load(path: os.PathLike)

Reads a file into a data frame. The file format is inferred from the file extension.

Supported types: csv, parquet, json, jsonl, arrow

Arguments:

  • path - os.PathLike The path to the file to read.

save

def save(data_frame: DataFrame, path: os.PathLike)

Saves a data frame to a file. The file format is inferred from the file extension.

Arguments:

  • data_frame - DataFrame The polars data frame to save.
  • path - os.PathLike The path to save the data frame to.