pytilpack.csv¶
pytilpack.csv
¶
CSV関連のユーティリティ集。
read_to_dict(path, fieldnames, skipinitialspace=True, lineterminator='\n')
¶
CSVファイルを辞書型のリストとして読み込む。
引数:
| 名前 | タイプ | デスクリプション | デフォルト |
|---|---|---|---|
path
|
str | Path
|
CSVファイルのパス。 |
必須 |
fieldnames
|
list[str]
|
CSVファイルのフィールド名。 |
必須 |
skipinitialspace
|
bool
|
先頭の空白をスキップするか。 |
True
|
lineterminator
|
str
|
行の終端文字。 |
'\n'
|
戻り値:
| タイプ | デスクリプション |
|---|---|
list[dict[str, Any]]
|
CSVファイルの内容。 |