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?
Asked
Active
Viewed 85 times
-1
-
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 Answers
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

user16967064
- 1
- 1