Discover functions built by the community. Run them instantly via API or clean UI.
Remove rows containing NaN values from a CSV or Excel file. The cleaned file is saved in the same format (CSV or XLSX). Args: file (FilePath): Input CSV or Excel file. Returns: str: Path to the cleaned file (same format as input).
Generate a synthetic CSV file with random data and some NaN values. Args: rows (int): Number of rows to generate. nan_ratio (float): Approximate fraction of cells to replace with NaN (0–1). Returns: str: Path to the generated CSV file.