下記のフォームにCSVファイルをアップロードするだけで、自動的にYAMLファイルに変換されます。ツールオプションでは、フィールド区切り文字、フィールド引用符、コメント文字を指定して、カスタムCSV形式に対応させることができます。さらに、出力YAML形式として、CSVヘッダーを保持する形式とCSVヘッダーを除外する形式を選択できます。
In this example, we transform a short CSV file containing a music playlist into structured YAML data. The input CSV contains five records with three columns each and the output YAML contains five lists of lists (one list for each CSV record). In YAML, lists start with the "-" symbol and the nested lists are indented with two spaces
The Beatles,"Yesterday",Pop Rock Queen,"Bohemian Rhapsody",Rock Nirvana,"Smells Like Teen Spirit",Grunge Michael Jackson,"Billie Jean",Pop Stevie Wonder,"Superstition",Funk
- - The Beatles - Yesterday - Pop Rock - - Queen - Bohemian Rhapsody - Rock - - Nirvana - Smells Like Teen Spirit - Grunge - - Michael Jackson - Billie Jean - Pop - - Stevie Wonder - Superstition - Funk
In this example, we are working with CSV data that summarizes key properties of three planets in our solar system. The data consists of three columns with headers "planet", "relative mass" (with "1" being the mass of earth), and "satellites". To preserve the header names in the output YAML data, we enable the "Transform Headers" option, creating a YAML file that contains a list of YAML objects, where each object has three keys: "planet", "relative mass", and "satellites".
planet,relative mass,satellites Venus,0.815,0 Earth,1.000,1 Mars,0.107,2
- planet: Venus relative mass: 0.815 satellites: '0' - planet: Earth relative mass: 1.000 satellites: '1' - planet: Mars relative mass: 0.107 satellites: '2'
In this example, we convert a CSV file with non-standard formatting into a regular YAML file. The input data uses a semicolon as a separator for the "product", "quantity", and "price" fields. It also contains empty lines and lines that are commented out. To make the program work with this custom CSV file, we input the semicolon symbol in the CSV delimiter options. To skip comments, we specify "#" as the symbol that starts comments. And to remove empty lines, we activate the option for skipping blank lines (that do not contain any symbols). In the output, we obtain a YAML file that contains a list of three objects, which use CSV headers as keys. Additionally, the objects in the YAML file are indented with four spaces.
item;quantity;price milk;2;3.50 #eggs;12;2.99 bread;1;4.25 #apples;4;1.99 cheese;1;8.99
- item: milk quantity: 2 price: 3.50 - item: bread quantity: 1 price: 4.25 - item: cheese quantity: 1 price: 8.99
CSV データを JSON 形式に変換します。
CSV データを XML 形式に変換します。
CSV の行を列に変換します。
CSV データを TSV 形式に変換します。
CSV 列を並べ替えます。
CSVファイルの区切り文字を変更する
CSV 内で値が欠落している行と列をすばやく見つけます。
CSV ファイルをすばやく転置します。
CSV ファイル内の任意の場所に 1 つ以上の新しい列をすばやく挿入します。
TSVをJSON形式に変換する