翻訳済み
このページは日本語に翻訳済みです。
csv
CSVファイルから構造化データを読み込む。
CSVファイルは読み込まれ、文字列からなる2次元配列にパースされます。 具体的には、CSVファイルの各行が文字列の配列として表現され、 すべての行が単一の配列にまとめられます。 ヘッダー行は削除されません。
例
#let results = csv("example.csv")
#table(
columns: 2,
[*Condition*], [*Result*],
..results.flatten(),
)

引数ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters
Parameters are the inputs to a function. They are specified in parentheses after the function name.
source
CSVファイルへのパス、または生のCSVバイト列。
row-type
ファイルの各行の表現方法。
array
に設定すると、 各行は単純な文字列の配列として表現されます。dictionary
に設定すると、 各行はヘッダーのキーと文字列を対応付けた辞書として表現されます。 このオプションは、CSVファイルにヘッダー行が存在する場合にのみ意味があります。
デフォルト値: array
定義DefinitionsFunctions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.
Definitions
Functions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.
decode
`csv.decode`は非推奨です。代わりにバイト列を直接`csv`に渡してください。
CSVの文字列やバイト列から構造化データを読み込む。
data
CSVデータ。
row-type
ファイルの各行の表現方法。
array
に設定すると、 各行は単純な文字列の配列として表現されます。dictionary
に設定すると、 各行はヘッダーのキーと文字列を対応付けた辞書として表現されます。 このオプションは、CSVファイルにヘッダー行が存在する場合にのみ意味があります。
デフォルト値: array