Diysb Tools

CSV कॉलम स्वैप करें

बस नीचे दिए गए फ़ॉर्म में अपनी CSV फ़ाइल अपलोड करें, स्वैप करने के लिए कॉलम निर्दिष्ट करें, और टूल स्वचालित रूप से आउटपुट फ़ाइल में निर्दिष्ट कॉलम की स्थिति बदल देगा। टूल विकल्पों में, आप उन कॉलम की स्थिति या नाम निर्दिष्ट कर सकते हैं जिन्हें आप स्वैप करना चाहते हैं, साथ ही अधूरे डेटा को ठीक कर सकते हैं और वैकल्पिक रूप से खाली रिकॉर्ड और टिप्पणी किए गए रिकॉर्ड हटा सकते हैं।

CSV टूल्स

What is a CSV कॉलम स्वैप करें?

यह टूल CSV डेटा के कॉलम की स्थिति बदलकर उसे पुनर्व्यवस्थित करता है। कॉलम बदलने से अक्सर इस्तेमाल होने वाले डेटा को एक साथ या आगे रखकर CSV फ़ाइल की पठनीयता बढ़ाई जा सकती है, जिससे डेटा की तुलना और संपादन आसान हो जाता है। उदाहरण के लिए, आप पहले कॉलम को आखिरी कॉलम से या दूसरे कॉलम को तीसरे कॉलम से बदल सकते हैं। कॉलम की स्थिति के आधार पर उन्हें बदलने के लिए, चुनें

इनपुट टेक्स्ट
परिणाम
टूल विकल्प
Swap-From Column
Set Column-From position
Position of the first column you want to swap
Set Column-From Header
Swap-to Column
Set Column-To position
Position of the second column you want to swap
Set Column-To Header
Incomplete Data

Fill incomplete CSV data with empty symbols or a custom symbol.

Comments and Empty Lines
If checked, comments will be deleted
Comment character
Do not include empty lines in the output data.
CSV कॉलम स्वैप करें उदाहरण

Move the Key Column to the First Position

In this example, we use our CSV column swapping tool to bring the most important information to the first column. As we are planning to go on vacation soon, in the input of the tool, we load data about national parks that include their names and locations. To decide, which is the closest park to us, we need to see the parks location first, therefore, we swap the first and second data columns so that the "location" column is at the beginning of the CSV data.

Input
park_name,location
Yellowstone,Wyoming
Yosemite,California
Grand Canyon,Arizona
Rocky Mountain,Colorado
Zion Park,Utah
Output
location,park_name
Wyoming,Yellowstone
California,Yosemite
Arizona,Grand Canyon
Colorado,Rocky Mountain
Utah,Zion Park
Swap-From Column
Set Column-From position
Position of the first column you want to swap
Set Column-From Header
Swap-to Column
Set Column-To position
Position of the second column you want to swap
Set Column-To Header
Incomplete Data

Fill incomplete CSV data with empty symbols or a custom symbol.

Specify a custom symbol to fill incomplete CSV data with
Comments and Empty Lines
If checked, comments will be deleted
Do not include empty lines in the output data.

Reorganize Columns in Vitamins CSV

In this example, a lab intern made a mistake and created a corrupted CSV file with mixed-up columns and missing data. To fix the file, we swap the columns based on the headers "Vitamin" and "Function" so that the "Vitamin" column becomes the first in the output data. We also fill the incomplete CSV data by adding a custom asterisk "*" symbol in place of missing values.

Input
Function,Fat-Soluble,Vitamin,Sources
Supports vision,Fat-Soluble,A,Carrots
Immune function,Water-Soluble,C,Citrus fruits
Bone health,Fat-Soluble,D,Fatty fish
Antioxidant,Fat-Soluble,E,Nuts
Blood clotting,Fat-Soluble,K,Leafy greens
Energy production,Water-Soluble,B1
Energy production,Water-Soluble,B2
Energy production,Water-Soluble,B3,Meat
Protein metabolism,Water-Soluble,B6,Poultry
Nervous system,Water-Soluble,B12,Meat
Output
Vitamin,Fat-Soluble,Function,Sources
A,Fat-Soluble,Supports vision,Carrots
C,Water-Soluble,Immune function,Citrus fruits
D,Fat-Soluble,Bone health,Fatty fish
E,Fat-Soluble,Antioxidant,Nuts
K,Fat-Soluble,Blood clotting,Leafy greens
B1,Water-Soluble,Energy production,*
B2,Water-Soluble,Energy production,*
B3,Water-Soluble,Energy production,Meat
B6,Water-Soluble,Protein metabolism,Poultry
B12,Water-Soluble,Nervous system,Meat
Swap-From Column
Set Column-From position
Set Column-From Header

Header of the first column you want to swap.

Swap-to Column
Set Column-To position
Set Column-To Header

Header of the second column you want to swap.

Incomplete Data

Fill incomplete CSV data with empty symbols or a custom symbol.

Specify a custom symbol to fill incomplete CSV data with
Comments and Empty Lines
If checked, comments will be deleted
Do not include empty lines in the output data.

Place Columns Side by Side for Analysis

In this example, we change the order of columns in a CSV dataset to have the columns essential for analysis adjacent to each other. We match the "ScreenSize" column by its name and place it in the second-to-last position "-2". This groups the "ScreenSize" and "Price" columns together, allowing us to easily compare and choose the phone we want to buy. We also remove empty lines and specify that lines starting with the "#" symbol are comments and should be left as is.

Input
Brand,Model,ScreenSize,OS,Price

Apple,iPhone 15 Pro Max,6.7″,iOS,$1299
Samsung,Galaxy S23 Ultra,6.8″,Android,$1199
Google,Pixel 7 Pro,6.4″,Android,$899

#OnePlus,11 Pro,6.7″,Android,$949
Xiaomi,13 Ultra,6.6″,Android,$849
Output
Brand,Model,OS,ScreenSize,Price
Apple,iPhone 15 Pro Max,iOS,6.7″,$1299
Samsung,Galaxy S23 Ultra,Android,6.8″,$1199
Google,Pixel 7 Pro,Android,6.4″,$899
Xiaomi,13 Ultra,Android,6.6″,$849
Swap-From Column
Set Column-From position
Set Column-From Header

Header of the first column you want to swap.

Swap-to Column
Set Column-To position
Position of the second column you want to swap
Set Column-To Header
Incomplete Data

Fill incomplete CSV data with empty symbols or a custom symbol.

Comments and Empty Lines
If checked, comments will be deleted
Comment character
Do not include empty lines in the output data.

सभी CSV टूल्स