To Table

Category: Text

Status: Registered and callable in the CyberChef 11.3.0 compatibility inventory.

Input / output: string → html

Background: https://wikipedia.org/wiki/Comma-separated_values

What it does

Data can be split on different characters and rendered as an HTML, ASCII or Markdown table with an optional header row. Supports the CSV (Comma Separated Values) file format by default. Change the cell delimiter argument to \t to support TSV (Tab Separated Values) or | for PSV (Pipe Separated Values). You can enter as many delimiters as you like. Each character will be treat as a separate possible delimiter.

Note

Status here means the operation name is implemented and callable. It does not by itself promise byte-for-byte parity for every upstream option. See Compatibility and current status for the verified scope and known boundaries.

Arguments and options

Arguments are positional. Keep their order when using bake() or Pipeline.then().

Index

Name

UI type

PyChef default

Accepted values / format

0

Cell delimiters

binaryShortString

','

','

1

Row delimiters

binaryShortString

'\\r\\n'

'\\r\\n'

2

Make first row header

boolean

False

True or False

3

Format

option

'ASCII'

'ASCII', 'HTML', 'Markdown'

Recipe template

Important

This is a call template built from the documented defaults. Replace placeholder values such as empty keys, paths, patterns, or lookup data before running it.

from pychef import bake

input_value = "example"
args = [',', '\\r\\n', False, 'ASCII']
result = bake(input_value, [{"op": 'To Table', "args": args}])
print(result)

Pipeline example

from pychef import Pipeline

args = [',', '\\r\\n', False, 'ASCII']
transform = Pipeline().then('To Table', *args)
result = transform("example")

Dedicated operation module

The registered entry point lives in pychef.operations.by_operation.to_table. Direct calls receive the input value and a positional argument tuple:

from pychef.operations.by_operation.to_table import run

result = run("example", tuple([',', '\\r\\n', False, 'ASCII']))
pychef.operations.by_operation.to_table.run(value, args)

Run this operation using its shared internal implementation.

Parameters:
  • value (str | bytes)

  • args (Sequence[Any])

Return type:

str | bytes