Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import csv
# The path to your CSV file
csv_file_path = 'category.csv'
# Initialize an empty list to store the names
names = []
# Open the CSV file and read each row
with open(csv_file_path, mode='r', encoding='utf-8') as file:
reader = csv.reader(file)
next(reader) # Skip the header row if there is one
for row in reader:
# Assuming names are in the first column
names.append(row[1])
# names now contains all the names from the first column of your CSV
print(names)