CSV Files in Python || Python Tutorial || Learn Python Programming

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 25. 01. 2017
  • đ™Žđ™©đ™–đ™ź 𝙞𝙣 đ™©đ™đ™š đ™Ąđ™€đ™€đ™„ 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python Working with CSV files is simple in Python. Today we will introduce the CSV module and show you how to read and write CSV files. As a demo, we will analyze the first ten years of stock data for Google.
    You can download a CSV containing the first 10 years of Google stock data here: goo.gl/3zaUlD
    To learn Python, start our Python Playlist HERE:
    bit.ly/PythonHelloWorld
    Subscribe to Socratica: bit.ly/1ixuu9W
    ♩♩♩♩♩♩♩♩♩♩
    We recommend:
    Python Cookbook, Third edition from O’Reilly
    amzn.to/2sCNYlZ
    The Mythical Man Month - Essays on Software Engineering & Project Management
    amzn.to/2tYdNeP
    Shop Amazon Used Textbooks - Save up to 90%
    amzn.to/2pllk4B
    ♩♩♩♩♩♩♩♩♩♩
    Ways to support our channel:
    â–ș Join our Patreon : / socratica
    â–ș Make a one-time PayPal donation: www.paypal.me/socratica
    â–ș We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
    Thank you!
    ♩♩♩♩♩♩♩♩♩♩
    Connect with us!
    Facebook: / socraticastudios
    Instagram: / socraticastudios
    Twitter: / socratica
    ♩♩♩♩♩♩♩♩♩♩
    Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
    Written & Produced by Michael Harrison (@mlh496 on Twitter)
    FX by Andriy Kostyuk
    ♩♩♩♩♩♩♩♩♩♩

Komentáƙe • 448

  • @Socratica
    @Socratica  Pƙed 2 lety +7

    Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica

  • @Socratica
    @Socratica  Pƙed 4 lety +109

    It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🩉

    • @equitymonk34
      @equitymonk34 Pƙed 4 lety +4

      absolutely superb explanations on all videos and we will love to see more such videos.

    • @krishnathakur2138
      @krishnathakur2138 Pƙed 2 lety

      Please do a little graphics but i loved the explaination

  • @NeoGhiofish
    @NeoGhiofish Pƙed 4 lety +158

    Socratica. @3:45 saved my ass during my job interview Monday. I had to convert a text file with garbled data to a file that could be opened in Excel. I usually use Linux so I was mortified when I discovered that it was inserting blank lines after each row in the file. Then I remembered this video that I watched while cramming for the interview. They left a voicemail last night, saying they had "good news."
    Thank you so much.

    • @jetaimemina
      @jetaimemina Pƙed 4 lety +15

      @ehud kotegaro No, but he did find out that Jesus was born!

    • @gauravnegi4312
      @gauravnegi4312 Pƙed 4 lety

      @@jetaimemina lmfao! great comment.

  • @brutalbutler
    @brutalbutler Pƙed 5 lety +244

    Felt like im getting debriefed for an MI5 mission

  • @guiray2000
    @guiray2000 Pƙed 6 lety +9

    I went through about 20 Python tutorial sites to try to figure out how to just read a CSV file and still was confused (I am a programmer but new to Python). Then I discovered this video. It was one of the best presentations ever and very clear and exactly what I needed to know. It was also very futuristic like an intelligent robot on a spaceship giving instructions. So very well done indeed!

  • @pravin8419
    @pravin8419 Pƙed 5 lety +37

    Best mix of humor with mournful and melancholic voice to deliver substance. In short, what a lovely video with great information

  • @AnkitBindal97
    @AnkitBindal97 Pƙed 7 lety +13

    she's definitely one of the coolest python teachers on CZcams. loved the way she teaches python.. keep making more tutorials

  • @ronimiguel
    @ronimiguel Pƙed 7 lety +290

    Best presentation I've ever seen, I felt like I was in the future. Thanks

    • @Nasreddiin
      @Nasreddiin Pƙed 5 lety +2

      In the future? The future will be without machine...

    • @spencerjames9417
      @spencerjames9417 Pƙed 4 lety

      @@Nasreddiin bet

    • @ulysses1904
      @ulysses1904 Pƙed 4 lety +5

      I felt like I was in 1967's cliched vision of the future. Regardless, the content is great.

    • @Zook919
      @Zook919 Pƙed 3 lety

      Dude, I swear I felt the same... lol

    • @mviktor21
      @mviktor21 Pƙed 2 lety

      Socratica teaches as all learning videos must be, emphatetic but simple, to the point.

  • @KapilMarwaha
    @KapilMarwaha Pƙed 4 lety +18

    "With big data comes big responsibility !"
    ... you are just wow!

  • @onecanina
    @onecanina Pƙed 7 lety +53

    Thank you so much for the tutorials. These are excellent and so fun to watch. One suggestion, if possible, try not having the codes written on the very bottom of the video screen. When pausing the video to follow the steps and copy the codes the loading bar will appear and block the content. it is not even a problem, but I guess this could help the viewers trying to copy the codes =)

  • @ademolaorolu5930
    @ademolaorolu5930 Pƙed 6 lety +4

    You will never stop to amuse me with your use of words. The video is concise and precise.

  • @gordontang7837
    @gordontang7837 Pƙed 4 lety +7

    "with big data, comes big responsibility" that was the funniest line

  • @PrestonBannister
    @PrestonBannister Pƙed 7 lety +79

    From back-of-mind: You should be cast in the next Tron movie. :)

    • @EmileAI
      @EmileAI Pƙed 6 lety

      Preston Bannister there won’t be another one

    • @arthurnonimus
      @arthurnonimus Pƙed 5 lety

      @@EmileAI Just wait.....

    • @dirkmcnasty8585
      @dirkmcnasty8585 Pƙed 5 lety

      @@EmileAI yep, it was turned TROFF now... :(

  • @aws96314
    @aws96314 Pƙed 7 lety +132

    the presentation is superb

    • @TheNsn666
      @TheNsn666 Pƙed 7 lety +8

      future of learning is by games and things that looks like games.

    • @zbzb-ic1sr
      @zbzb-ic1sr Pƙed 7 lety +8

      Better than a lot of paid tutorials.

    • @shobharoy2033
      @shobharoy2033 Pƙed 7 lety +5

      Exactly my opinion, better than Lynda and Udemy

  • @Helen-lm6bb
    @Helen-lm6bb Pƙed 6 lety +39

    lol this video is so dramatic... I love it!

    • @dabbrill4609
      @dabbrill4609 Pƙed 5 lety +1

      Right? It's like the telenovela version of a programming guide.

  • @darkguardian1314
    @darkguardian1314 Pƙed 4 lety +38

    Cortana's weird sister. đŸ€Ł
    The instructor is an an actor listed in IMDB.

  • @ryanvb3452
    @ryanvb3452 Pƙed 6 lety

    This Python series deserves a CZcams channel of its own. Please make more videos.

  • @essuede
    @essuede Pƙed 5 lety

    if all subjects in school were presented in a unique way like this, it would make things much more interesting and attainable.
    thank you for this.

  • @naveedhunzai
    @naveedhunzai Pƙed 4 lety +2

    In love with Python because of You Socratica, May you live forever in the realms of Big Data :)

  • @frankkoslowski6917
    @frankkoslowski6917 Pƙed 4 lety +2

    A good presentation is one thing. When it stimulates further self motivated research; then it becomes excellent.

  • @mindsetnuggets
    @mindsetnuggets Pƙed 6 lety +2

    My oh my!! This is out of this world tutorial. Best presentation ever. I have subscribed so that I know what I should know but don't know or could know if I didn't subscribe.

  • @BryanTyner
    @BryanTyner Pƙed 6 lety +10

    Great tutorials! Simple tip for accessibility: Avoid using the bottom 1/10th of the video window, as it will be covered by closed captions. With captions on, I can't see the code, arrows, and other content you're describing. Keeping content above the bottom 1/10th of the video window improves accessibility for users with hearing impairments and those who aren't fluent English speakers.

    • @jessicabrock3220
      @jessicabrock3220 Pƙed 5 lety

      Bryan Tyner also, I would suggest not to use the top 1/10 of the window. CZcams places links for suggested videos there.

  • @disneykidzshowhd4377
    @disneykidzshowhd4377 Pƙed 5 lety +1

    I hope 20 years from now, all youtube videos are all like this one. This is 20 years to the future.

  • @FuZhixiang
    @FuZhixiang Pƙed 6 lety

    Having watched many videos, I find this one is helpful and straightforward.

  • @raissabenoccithibes3768
    @raissabenoccithibes3768 Pƙed 4 lety +1

    This is an amazing job you guys have been doing! So great to learn!
    Thank you so much for helping me to go towards Data Science!

  • @GEScott71
    @GEScott71 Pƙed 5 lety

    Very helpful, I needed to read and then write csv files and this tutorial helped me write my first useful program!

  • @freakindividual
    @freakindividual Pƙed 7 lety

    omg straight to the point tutorial with a practical example what will make my job easier. no noise what so ever. outstanding channel. thank u

  • @igorthelight
    @igorthelight Pƙed 4 lety +9

    "Personally, I would've chosen a different name for a class. But I'm only a singleton".
    Superb! :-)

    • @igorthelight
      @igorthelight Pƙed 4 lety

      @Paritosh Jadhav Oops! My mistake :-)

  • @gmccalip
    @gmccalip Pƙed 5 lety

    Best resource on this that I have found. Outstanding job of presenting a simple, yet robust method to handle CSVs.
    I did have one minor glitch, an error message about "file = open(path, newline='')"
    The solution is "file = open(path,'rU')" # the U is uppercase.

  • @-x-dx7295
    @-x-dx7295 Pƙed 6 lety

    Un grand merci d'Aix les Bains en France. Vos vidĂ©os sont simples, claires et prĂ©cises. IdĂ©ales pour le dĂ©butant que je suis.🙏

  • @thecodinghustle1006
    @thecodinghustle1006 Pƙed 5 lety +2

    i absolutely love her presentation! and team socratica too

  • @collardwe1
    @collardwe1 Pƙed 6 lety +8

    Ulka Simone Mohanty you are one of the best teachers in the world. Your style and clear explanations make the learning experience one of the best I have ever had. Thank you very much

    • @silversolver7809
      @silversolver7809 Pƙed 5 lety +1

      She does a great voice-over, very convincing as if she knew the material.

    • @CarbonsHDTuts
      @CarbonsHDTuts Pƙed 2 lety

      @@silversolver7809 I think it's because she does know the material, her twitter says shes a comp-sci geek

    • @silversolver7809
      @silversolver7809 Pƙed 2 lety

      @@CarbonsHDTuts :) I was just poking fun at the text-to-speech delivery.

  • @seosamhohaodha3040
    @seosamhohaodha3040 Pƙed 4 lety

    awesome tutorials, really looking forward to seeing a lot more of yalls work you guys obviously work very hard to achieve this level of quality,

  • @abdulhamidyusuf2848
    @abdulhamidyusuf2848 Pƙed 5 lety +3

    every time she says RUN i hear the music in my head đŸ˜č, TBH the content is charming, thank you.

  • @mahajanravish
    @mahajanravish Pƙed 7 lety +30

    ha ha 😅 really good. Your way of teaching is different and exceptional.

  • @sagarghait2760
    @sagarghait2760 Pƙed 5 lety

    I thought, I was watching a movie.. great tutorial to Learn...the way of presentation is so good đŸ€—

  • @osein8900
    @osein8900 Pƙed rokem

    the best educational video I have ever seen in youtube
    thanks a bunch

  • @mukhitdinkakenov3238
    @mukhitdinkakenov3238 Pƙed 5 lety

    Thank you a lot for the provided tutorial. Saved much time to understand, how the current things work.

  • @Julio-uq1ie
    @Julio-uq1ie Pƙed 6 lety +1

    Love at python vids from Socratica.

  • @xxxyyy5983
    @xxxyyy5983 Pƙed 2 lety

    I love these tutorials. They remind me of the old C&C games.

  • @ezequielgallo1961
    @ezequielgallo1961 Pƙed 5 lety

    Saved my life! Thank you so much!! Furthermore It is so inspiring. What a legend!!

  • @venutekmal9878
    @venutekmal9878 Pƙed 5 lety

    Great work Socratica , really excellent presentation on python and stock returns process

  • @tawhidshahrior8804
    @tawhidshahrior8804 Pƙed 2 lety

    this is the coolest tutorial i have ever come across.

  • @plaifaha.2674
    @plaifaha.2674 Pƙed 7 lety

    I found solution to remove quotes from each row, I was finding this video. Thank you very much!

  • @QuarktaschemitSenf
    @QuarktaschemitSenf Pƙed 2 lety

    hahaha the presentation 🙂
    *dramatic tone* "Get ready to look at values, that have been seperated....*dramatic pause* by commas".
    Funny, entertaining and educational. Good job!

  • @coffeeisthepathtovictory1290

    LOVE this intro, it reminds one of the game Command and Conquer Tiberian sun with those video cut scenes ❀

  • @ezequielgallo1961
    @ezequielgallo1961 Pƙed 5 lety

    Thank you for being so amazing! Description is outstanding, thank you so much!

  • @oinn6216
    @oinn6216 Pƙed 4 lety

    Amaizing video format. The best I've seen. I'm continue watching even I'm not a python dev :D

  • @faroukhasnaoui5097
    @faroukhasnaoui5097 Pƙed 4 lety

    I repeated this video 2 times, it's a very important lesson, Thank you.

  • @riskyrun
    @riskyrun Pƙed 3 lety

    Your mission:Should you choose to save the world.Or just save it in a CSV format.Love these videos.

  • @Socratica
    @Socratica  Pƙed 4 lety +28

    Welcome to Socratica! You can see our entire Python Playlist here: bit.ly/PythonSocratica
    Subscribe to see all our new videos! bit.ly/SocraticaSubscribe

    • @abhishekbhandari2203
      @abhishekbhandari2203 Pƙed 4 lety +2

      ma'am, can you please tell?
      If I want to change the order of the data with respect to date, then what should we do? for example:- If I want to change the order like the data with odd date will come first or any random order. please help.

    • @evergriven7402
      @evergriven7402 Pƙed 4 lety

      Thank you for the videos ..Great Quality!! I love the tome in which you present the information .. Liked and subscribed

  • @alamagha2039
    @alamagha2039 Pƙed 6 lety

    You are a magic to my intellectual development.

  • @vladimirignatov2121
    @vladimirignatov2121 Pƙed 7 lety

    As far as i can understand the main goal of this tutorial is a demonstration of advantages of the csv-module over general python's method of reading csv-files. More precisely you declare that the csv-module can parse csv-file and manage exceptions more robust than the general method. But all that you demonstrate for csv-module can be implemented by general python's file reading ways equally. You doesn't demonstrate by examples what exactly can do csv-module that couldn't do general python's file reading techniques.
    In the rest very good, clear, creative and visually attractive tutorial.

  • @cryingkelp
    @cryingkelp Pƙed 4 lety

    This channel is awesome and this video was extremely helpful. Thank you!!

  • @maslak
    @maslak Pƙed 5 lety

    Hey Socratica, I absolutely adore your videos, and Ulka is perfect in her role.
    May I suggest one thing regarding the "open"? It's a good practice to close the file after usage, but even better is to use '''with open(fileName, "wb") as file:'''
    it closes the file at the end of indentation by itself so you don't have to worry about it :)

  • @uploader3371
    @uploader3371 Pƙed 7 lety

    I liked how fast the video goes. I paused and go back, but it's great to have a lot of info in short videos.
    LOL, the voice sounds so strict and seems like a sci-fi movie. haha

  • @Mbaba56
    @Mbaba56 Pƙed 7 lety

    we would love to see some dlib for python tutorials . i just love how you take those small details into account . thank you

  • @juliastovall5749
    @juliastovall5749 Pƙed 7 lety

    this is the best utube video I have ever seen

  • @TonderayiKanoz
    @TonderayiKanoz Pƙed 7 lety

    Awesome! thumbs up Ulka and your team.

  • @MoSec9
    @MoSec9 Pƙed 4 lety

    I usually hate robot narration, but this may just be the sexiest robot ever. I can't get enough of this. On a more serious note, GREAT job! and thank you!

  • @elghark
    @elghark Pƙed 5 lety

    Starting from 00:49 .... that music in background simply great!

  • @cloud77hot40
    @cloud77hot40 Pƙed 6 lety

    Thank you for this great video! Really helped me out.

  • @asoftraiden
    @asoftraiden Pƙed 7 lety

    Ridiculously beautiful tutorial.

  • @sravanbob
    @sravanbob Pƙed 7 lety

    advance teaching great lessons like a sci-fi movie style tutorials grt work !!!

  • @pusac5697
    @pusac5697 Pƙed 7 lety +2

    ... if you had only subscribed... genious!

  • @PunmasterSTP
    @PunmasterSTP Pƙed 3 lety

    CSV? More like CS-yee...haw! Another phenomenal Python video from Socratica!

  • @pravarsharma
    @pravarsharma Pƙed 4 lety

    Woww now that's something i never expected.. You got a subscriberđŸ€©

  • @zeyadramadan8759
    @zeyadramadan8759 Pƙed 4 lety

    Really like your videos. Always to the point.

  • @joshambush8574
    @joshambush8574 Pƙed 6 lety +2

    oh god this has such a hackery vibe. love it lol

  • @wuersen
    @wuersen Pƙed 2 lety

    Girl you rock and you need your own Stand up Comeday show!!!

  • @subhadipml
    @subhadipml Pƙed 5 lety

    New presentation ......first time seen ..thanks ..best explanation

  • @rahulpandey974
    @rahulpandey974 Pƙed 4 lety

    really liked it , I am a beginner here
    thanks for these

  • @paguerchanel
    @paguerchanel Pƙed 3 lety

    This video format is amazing!!!

  • @LJHuang-jn8bj
    @LJHuang-jn8bj Pƙed 7 lety

    Perfect demo and explanation

  • @user-kp5ps7gj8b
    @user-kp5ps7gj8b Pƙed 2 lety

    Very Unique way to create tutorial.. Great Job.

  • @sedimenter
    @sedimenter Pƙed 6 lety

    Interesting. I like the format, a little strange, but engaging. THank you.

  • @swadhikarc7858
    @swadhikarc7858 Pƙed 7 lety

    Awesome video. Subscribed. Expecting more videos

  • @benji667
    @benji667 Pƙed 7 lety

    got my subscription. Dayum well presented

  • @asoftraiden
    @asoftraiden Pƙed 7 lety

    Best girl of socratica.. please make more programming courses.. make it more advanced.

  • @enockoloo3814
    @enockoloo3814 Pƙed 8 měsĂ­ci

    Awesome indeed - thanks for sharing.

  • @TheBontenbal
    @TheBontenbal Pƙed 4 lety

    I love the socratica movies!
    However, if you just want to show the data prettytable is also a nice option:
    from prettytable import from_csv
    csv_file = open('google_stock_data.csv')
    print(from_csv(csv_file))

  • @techniumunlimited4567
    @techniumunlimited4567 Pƙed 7 lety

    Please do more ^_^ Will feature you in my programming playlist if thats ok ^_^

  • @mtcondie
    @mtcondie Pƙed 6 lety +1

    This is the first video I have watched of the python series and I am only 22 seconds in to the video. But, I feel like this video is a mission briefing in a video game cut scene. also, I am picking up a very seven of nine vibe. lol.

  • @charlescham2024
    @charlescham2024 Pƙed 7 lety +2

    great video!

  • @mutiasafari7369
    @mutiasafari7369 Pƙed 6 lety

    thank's for your tutorial, it's so helpfull for me..

  • @FriezaE46
    @FriezaE46 Pƙed 7 lety

    Awesome style!

  • @valb4184
    @valb4184 Pƙed 6 lety

    Very well explained and informative video. You are really good at breaking down points. Can you explain what a KIX script is? Thanks in advance.

  • @ubermensch5472
    @ubermensch5472 Pƙed 3 lety

    wow, you are one serious teacher

  • @MikeChaseJr
    @MikeChaseJr Pƙed 3 lety

    This is soooo hecka awesome I love it!!

  • @ammarmohammed2040
    @ammarmohammed2040 Pƙed 7 lety

    Wow! Excellent.

  • @swannschilling474
    @swannschilling474 Pƙed 2 lety

    Always a pleasure!! đŸ„°

  • @cpobyrne1
    @cpobyrne1 Pƙed 2 lety

    I love this singleton!

  • @narsinghyadav1071
    @narsinghyadav1071 Pƙed 3 lety

    I'd love more Python from Socratica

  • @MrAviaportal
    @MrAviaportal Pƙed 4 lety

    I just ran this video once again in case i did not understand something...I did not even on the second time.......but i damn love that voice

  • @MrEstebanEscudero
    @MrEstebanEscudero Pƙed 5 lety

    Great video! Thanks!

  • @akramsystems
    @akramsystems Pƙed 7 lety +10

    if you're using python 2.7 the newline=' ' wont work, instead add import io dependency and use io.open() instead of open()

  • @siki3702
    @siki3702 Pƙed 3 lety

    I am in love with this baji♄

  • @MrTigerstyle80
    @MrTigerstyle80 Pƙed 6 lety

    Amaze-balls video series first off. I love the deadpan delivery of jokes. Do a pandas tutorial. Csv is going the way of the dodo

  • @goufsunchannel5800
    @goufsunchannel5800 Pƙed 3 lety

    Its like future AI ..amazing . keep it up 👍

  • @TaufiqueHassan
    @TaufiqueHassan Pƙed 6 lety

    exceptional!! Thanks!!