Python 3 Programming Tutorial - Reading from a CSV spreadsheet

Python 3 Programming Tutorial - Reading from a CSV spreadsheet

sentdex

10 лет назад

294,578 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@avixx
@avixx - 17.01.2022 00:37

You're amazing :)))

Ответить
@machochocolate7679
@machochocolate7679 - 12.10.2021 07:29

Great tutorial, Thanks guy who looks like Edward Snowden.

Ответить
@joha8227
@joha8227 - 01.03.2021 09:20

Thanks for your affords! :) Old playlist, still valuable, yayyy. -- Simple question: Since the "with open" all your code is indented. A"must", because longer code gets pretty messy, no?

Ответить
@sahanashanbhag4842
@sahanashanbhag4842 - 13.11.2020 23:36

thanks a lot💕

Ответить
@NovaWarrior77
@NovaWarrior77 - 21.10.2020 04:33

THANK YOU SO MUCH!!!

Ответить
@TheNotoriousFonzy
@TheNotoriousFonzy - 30.09.2020 15:55

Used this for my Netflix viewing history CSV... awesome lol

Ответить
@JohnMorrison32
@JohnMorrison32 - 16.09.2020 17:16

fam can u speak up tf u aint loud enough

Ответить
@tcoo1999
@tcoo1999 - 10.08.2020 01:20

Great video. Thank you! It's very easy to understand :)

Ответить
@ashleypursell9702
@ashleypursell9702 - 03.04.2020 11:39

omg thank you so much you are the best

Ответить
@SebThrows
@SebThrows - 30.03.2020 01:58

So say you have a .csv file where you have to read a row and you want to print that one item from that set. How would you go about doing so?

Ответить
@erikbennacer2717
@erikbennacer2717 - 26.01.2020 05:16

Hmmm, and where should I place this file for Python to see it?

Ответить
@anuthammukunthan6988
@anuthammukunthan6988 - 15.01.2020 10:21

ik i'm very late but thank you soo much. i really needed this

Ответить
@alvinnivla4051
@alvinnivla4051 - 22.11.2019 03:36

How do you convert the csv data into a float ?

Ответить
@shobhitranjan3957
@shobhitranjan3957 - 24.06.2019 10:15

NICE !

Ответить
@jfarr206
@jfarr206 - 19.06.2019 06:13

You rock, brutha! Thanks. This is just what I was looking for.

Ответить
@nagarathnacr9305
@nagarathnacr9305 - 10.05.2019 04:47

im getting an error no such file 'example.csv' i dont know where file has

Ответить
@chloekimball536
@chloekimball536 - 22.02.2019 15:31

I love the way you teach <3 Thank you so much!

Ответить
@olekristianrannekleiv762
@olekristianrannekleiv762 - 19.02.2019 11:22

why: color = row[3]
colors.append(color)?

why not colors.append(row[3]) ?

Ответить
@Usammityduzntafraidofanythin
@Usammityduzntafraidofanythin - 29.01.2019 06:20

Obligatory "Hi Edward Snowden" Comment

Ответить
@salahoum9036
@salahoum9036 - 14.01.2019 22:08

can I ask you ?

Ответить
@nicollasgomes
@nicollasgomes - 23.12.2018 04:41

Very good, thanks

Ответить
@franco521
@franco521 - 18.10.2018 00:04

wth is WITH AS?

Ответить
@diy-projects
@diy-projects - 16.10.2018 09:02

Thank you so much, I couldn't find a video describing how to do columns and rows. Youre a god.

Ответить
@peanutbrittle7577
@peanutbrittle7577 - 27.09.2018 15:02

Hello what is the purpose of "delimiter=,"

Ответить
@shivamsoni9763
@shivamsoni9763 - 18.09.2018 17:17

Please anyone help to resolve this error.
import csv
with open('ex1.csv') as csvfile:
read_file= csv.reader(csvfile,delimiter=',')
print(read_file)
color = []
name = []
for r in read_file:
print(r)
color = r[3]
name = r[1]
color.append(color)
name.append(name)
print(name)
print(color)
<_csv.reader object at 0x7f8685505e48>
['22/may/1995', 'shivam', 'lko', 'black']

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-52-a1561de3b081> in <module>()
12 name = r[1]
13
---> 14 color.append(color)
15 name.append(name)
16

AttributeError: 'str' object has no attribute 'append'

Ответить
@edwinaramburo9168
@edwinaramburo9168 - 13.09.2018 20:38

Great stuff!

Ответить
@ankushmahajan2198
@ankushmahajan2198 - 05.09.2018 15:17

got an error no such directory found
though the file is saved with csv plss help

Ответить
@raufmohammed9645
@raufmohammed9645 - 01.09.2018 00:07

Please can me using python in GUI remote access desktop

Ответить
@cultofsogga5863
@cultofsogga5863 - 14.07.2018 12:18

index coldex sentdex

Ответить
@ThatGuy-yr9uc
@ThatGuy-yr9uc - 30.06.2018 04:30

You need to move your face cam or a least shrink it cause i missed half that lesson due to not seeing the code...

Ответить
@keithsanders6309
@keithsanders6309 - 28.06.2018 19:12

Very helpful!

Ответить
@777jones
@777jones - 15.06.2018 18:42

Thank you Edward!

Ответить
@info6695
@info6695 - 13.06.2018 08:38

If my csv file has an header, how to make our code realize that that's our header and we dont need to print the header text?

Ответить
@adityashourya3705
@adityashourya3705 - 12.06.2018 09:11

will the real edward snowden please stand up , i think we are gonna have a problem here

Ответить
@nikhilsai859
@nikhilsai859 - 11.06.2018 14:32

why doesnt the print(readcsv) part work?

Ответить
@markusandersson5099
@markusandersson5099 - 30.05.2018 15:31

Anyone who got a tip for a CSV like program for Linux/Ubuntu?

Ответить
@shibangibarua2285
@shibangibarua2285 - 26.05.2018 10:16

how to overcome this error

object has no atrribute to append

Ответить
@minhazulislam889
@minhazulislam889 - 17.05.2018 12:20

how i apply this for jupyter notebook

Ответить
@pmale90
@pmale90 - 12.04.2018 12:47

How to take an average number for one row?

Ответить
@darmando9834
@darmando9834 - 01.04.2018 03:19

I was confused all day, thinking I was doing something wrong, the code was not working. And it was because I misspelled "delimiter"

Ответить
@opssheesh
@opssheesh - 27.03.2018 21:34

HELP!!!
error = csv has no attribute "reader"
im using python 3.6
i used dir() and "reader" is nowhere to be found!

Ответить
@smallcc7961
@smallcc7961 - 17.03.2018 08:59

Since a comma is only one delimiter allowed in a group of many, a better association for the first element of the acronym 'CSV' would be 'common' wouldn't it? (since each separator is of the same relative type) Just a thought...

Ответить
@djleisheng
@djleisheng - 23.02.2018 23:39

Lol I made my own CSV module already but I didn't know it was part of python standard library. Oops.

Ответить
@raghavgupta1157
@raghavgupta1157 - 08.02.2018 18:02

is it was CSV tutorial really?

Ответить
@lxxmi_
@lxxmi_ - 05.02.2018 15:55

i could never figure, which one is identifier and which ones is keyword. Because you never tell the words u useare default keywords and cannot be changed as it is a builtin feauture/function while expaining. Please do mention which are keywords and which are userdefined identifiers.
And does csv have only these functions? or more?
Can we just access csv files or we can also edit/write from python script.

Ответить
@philippecolin151
@philippecolin151 - 08.01.2018 14:57

what kind of fuel are you using?

Ответить
@shockingvideos5225
@shockingvideos5225 - 06.01.2018 12:57

How we can make search efficient such that if string is made up of 2 names(<first> <last> then entering first or last name returns the result

Ответить
@leytonjay
@leytonjay - 03.01.2018 23:16

I believe it's comma separated VALUES, but you're reading them in as variables 😁

Ответить