Diysb Tools

Transposer CSV

Il vous suffit de télécharger votre fichier CSV via le formulaire ci-dessous et cet outil le transposera automatiquement. Dans les options, vous pouvez spécifier le caractère de début des lignes de commentaire dans le fichier CSV pour les supprimer. De plus, si le fichier CSV est incomplet (valeurs manquantes), vous pouvez remplacer les valeurs manquantes par le caractère vide ou un caractère personnalisé.

Outils CSV

What is a Transposer CSV?

Cet outil transpose les fichiers CSV (valeurs séparées par des virgules). Il traite le fichier CSV comme une matrice de données et inverse tous les éléments sur la diagonale principale. Le fichier CSV de sortie contient les mêmes données CSV que le fichier d'entrée, mais toutes les lignes sont désormais des colonnes, et toutes les colonnes des lignes. Après la transposition, le fichier CSV aura des dimensions opposées. Par exemple, si le fichier d'entrée comporte 4 colonnes et 3 lignes, le fichier de sortie comportera 3 colonnes et 4 lignes. Lors de la conversion, le programme supprime également les lignes inutiles et corrige les données incomplètes. Plus précisément, l'outil supprime automatiquement tous les enregistrements vides et les commentaires commençant par un caractère spécifique, que vous pouvez définir dans l'option. De plus, en cas de corruption ou de perte des données CSV, l'utilitaire complète le fichier avec des champs vides ou personnalisés, que vous pouvez spécifier dans les options. Csv-abulous !

Input CSV
Transposed CSV
Options d'outils
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.

Transposer CSV Exemples

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.