CSV Column To Python List

preview_player
Показать описание
Learn how to concatenate data from a CSV file into a python list. This video will walk through how to use the DictReader method from the CSV module to isolate a specific header from your CSV file into one python list.

00:00 Introduction
00:14 Explaining The Data
02:54 specify encodings in python
03:37 isolate rows
03:50 DictReader Method

#python
Рекомендации по теме
Комментарии
Автор

Thank you.... I have been searching on how to convert a column in a csv to a list / dynamically calculate the number of unique elements in a HUGE csv file... or rather, since I'm so new to programming, didn't even know what to ask. You are a great help my friend. Be blessed!

mansoorghumro
Автор

i spent two days looking for a way to do my assignment and this 5 minute video was all i needed, i really need to get better at searching for what i dont know haha

richardallen
Автор

BRUHHHH, literally, you solved my problem.
actually i was given a csv file of almost 3000 rows and 5 column, and i was asked to calculate covariances, correlations, it helped me completely

tarunsoni
Автор

Very useful video! Well paced and very clear. 👏

the_dev_life
Автор

you just safed me hours of typing. thanks a lot

teach
Автор

Thanks for sharing this very useful content.
Cheers!!!!

vitorribeirosa
Автор

hello, in your example. What if you wanted to continue with the next 10 rows, how would you write that? If you stop at row 10, rest for 1min then continue to the next ten until complete. thanks

revenge
Автор

Thank you.
One question; how about the situation that I want to add a new column using the data I have in my csv file? for example I have 2 columns in my csv file called open and close. I want to add a new column that shows (close - open)/open
I know it should be a code like follow
with open('IBM.csv', 'r')as input:
with open ('IBM.csv', 'w') as output:
writer = csv.writer(output, lineterminator='\n')
reader=csv.reader(input)
And then I need to use append. but I have no idea now to put all this together and write my final code!

mercedehsasanpour
Автор

I have a question after we pick the column. Is there a way to pick only certain rows within that column?

I tried changing the "count." To start from a different number instead of 0 but that didn't work.

scarletv.
Автор

how to find transpose of single column data?

anurathilakbandara
Автор

Do you know that the audience cannot see what you are talking about because of font size too small?

PCAN