Diysb Tools

CSV転置

以下のフォームにCSVファイルをアップロードするだけで、このツールが自動的にCSVを転置します。ツールのオプションでは、CSV内のコメント行の先頭文字を指定して削除できます。また、CSVが不完全(欠損値)な場合は、欠損値を空文字または任意の文字に置き換えることができます。

CSVツール

What is a CSV転置?

このツールは、カンマ区切り値(CSV)を転置します。CSVをデータの行列として扱い、すべての要素を主対角線を挟んで反転します。出力には入力と同じCSVデータが含まれますが、すべての行が列になり、すべての列が行になります。転置後、CSVファイルの次元は逆になります。たとえば、入力ファイルに4列3行がある場合、出力ファイルは3列4行になります。変換中に、プログラムは不要な行のデータを削除し、不完全なデータを修正します。具体的には、ツールはオプションで設定できる特定の文字で始まるすべての空のレコードとコメントを自動的に削除します。さらに、CSVデータが破損または失われた場合、ユーティリティはオプションで指定できる空のフィールドまたはカスタムフィールドでファイルを補完します。CSV-abulous!

Input CSV
Transposed CSV
ツールオプション
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

CSV転置 例

Transpose a 2x3 CSV

This example transposes a CSV with 2 rows and 3 columns. The tool splits the input data by the comma character, creating a 2 by 3 matrix. It then exchanges elements, turning columns into rows and vice versa. The output is a transposed CSV with flipped dimensions

foo,bar,baz val1,val2,val3
foo,bar,baz val1,val2,val3
foo,val1 bar,val2 baz,val3
foo,val1 bar,val2 baz,val3
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Transpose a Long CSV

In this example, we flip a vertical single-column CSV file containing a list of our favorite fruits and their emojis. This single column is transformed into a single-row CSV file and the rows length matches the height of the original CSV.

Tasty Fruit 🍑 peaches 🍒 cherries 🥝 kiwis 🍓 strawberries 🍎 apples 🍐 pears 🥭 mangos 🍍 pineapples 🍌 bananas 🍊 tangerines 🍉 watermelons 🍇 grapes
Tasty Fruit 🍑 peaches 🍒 cherries 🥝 kiwis 🍓 strawberries 🍎 apples 🍐 pears 🥭 mangos 🍍 pineapples 🍌 bananas 🍊 tangerines 🍉 watermelons 🍇 grapes
fTasty Fruit,🍑 peaches,🍒 cherries,🥝 kiwis,🍓 strawberries,🍎 apples,🍐 pears,🥭 mangos,🍍 pineapples,🍌 bananas,🍊 tangerines,🍉 watermelons,🍇 grapes
fTasty Fruit,🍑 peaches,🍒 cherries,🥝 kiwis,🍓 strawberries,🍎 apples,🍐 pears,🥭 mangos,🍍 pineapples,🍌 bananas,🍊 tangerines,🍉 watermelons,🍇 grapes
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Clean and Transpose CSV Data

In this example, we perform three tasks simultaneously: transpose a CSV file, remove comments and empty lines, and fix missing data. The transposition operation is the same as flipping a matrix across its diagonal and it is done automatically by the program. Additionally, the program automatically removes all empty lines as they cannot be transposed. The comments are removed by specifying the "#" symbol in the options. The program also fixes missing data using a custom bullet symbol "•", which is specified in the options.

Fish Type,Color,Habitat Goldfish,Gold,Freshwater #Clownfish,Orange,Coral Reefs Tuna,Silver,Saltwater Shark,Grey,Saltwater Salmon,Silver
Fish Type,Color,Habitat Goldfish,Gold,Freshwater #Clownfish,Orange,Coral Reefs Tuna,Silver,Saltwater Shark,Grey,Saltwater Salmon,Silver
Fish Type,Goldfish,Tuna,Shark,Salmon Color,Gold,Silver,Grey,Silver Habitat,Freshwater,Saltwater,Saltwater,•
Fish Type,Goldfish,Tuna,Shark,Salmon Color,Gold,Silver,Grey,Silver Habitat,Freshwater,Saltwater,Saltwater,•
CSV input Options
Enter the character used to delimit columns in the CSV input file.
Enter the quote character used to quote the CSV input fields.
Enter the character indicating the start of a comment line.
Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing.

Enter the character used to fill missing values.