Diysb Tools

Транспонировать 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.