-1

I have a csv file in which I want to add a new column and fill values in that column from a list. How can I do it using Python?

martineau
  • 119,623
  • 25
  • 170
  • 301
user245699
  • 17
  • 4
  • This has a lot of potential answers. Please help us narrow it down by posting an example of what your input looks like, what you'd like your output to look like, and anything you've already tried. – Woody1193 Sep 21 '21 at 16:06

1 Answers1

0

Firstly, you need to read csv file:

data = pd.read_csv('your file path')

Then assign list to the column:

data['column_name'] = list_name