Cut Columns

Extract specific columns from CSV files using column indices

Accepted format: CSV (Maximum size: 500 MB)
Enter the column index to extract (starts from 1).

Cut Columns

Function

Cut Columns extracts one or more specific columns from a CSV file using their column index. It is a lightweight way to reduce large tabular datasets and focus only on the variables required for downstream analysis.


Input Format

  • A CSV file containing rows and columns.
  • A column number specifying which column to extract.

Output Format

  • A CSV file containing only the selected column.
  • Original row order is preserved.

Applications

  • Data filtering and cleanup.
  • Feature extraction for machine learning and statistical analysis.
  • Isolating gene IDs, expression values, or sample metadata.
  • Creating smaller datasets for downstream tools.
  • Quick inspection of column contents.

Example Usage

Extract the second column from a CSV file:

cut -d',' -f2 input.csv > column2.csv

Extract columns 1 and 3:

cut -d',' -f1,3 input.csv > selected.csv

Python Example

import pandas as pd

df = pd.read_csv("input.csv")

df.iloc[:, [0]].to_csv(
    "column1.csv",
    index=False
)

Suggested Reading


Important Note: Column numbering follows the Unix cut convention and starts from 1 rather than 0. For example: 1 refers to the first column, 2 refers to the second column, and so on.