Read CSV Files in Python with csv.DictReader - Iterate through Rows as Dicts with Columns as Keys

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 37

  • @Mornepin
    @Mornepin 3 роки тому +10

    I was in a long trouble modifying a csv file, and I used the logic of your code to solve my issue !
    THANK YOU.
    My god, hours of pain for that. What a relief.

  • @jasinAmsterdam1976
    @jasinAmsterdam1976 3 роки тому +4

    Thank you so much. I just started my journey with python and just want to learn it for personal use. I really get what you are explaining here, and my brain is already drunk with the possibilities.
    I never knew that I could get excited about programming 😄

  • @SaturnLady
    @SaturnLady 3 дні тому

    Thank you sooo so much hope every day of your life will be brilliant and all of your wishes come true

  • @TechMarketer
    @TechMarketer 3 роки тому +1

    Kirs, it's great tutorial - you show how things works and explain what is around. Thank you very much.

  • @Blu3wonder
    @Blu3wonder 3 роки тому

    Cheers for being so thorough! Hate not understanding WHY the code I'm typing works. Now Subscribed!

  • @WajidKhan-gn3hj
    @WajidKhan-gn3hj 3 роки тому +2

    Your explanation are very clear thanks for making them. It will help me alot.

  • @mehmedkukavica8076
    @mehmedkukavica8076 2 роки тому

    Super demonstration.Thank you!

  • @higiniofuentes2551
    @higiniofuentes2551 Рік тому

    Thank you for this very useful video!

  • @farhanahmad5934
    @farhanahmad5934 2 роки тому +1

    Thanks, great video !

  • @MayelPelle
    @MayelPelle Рік тому

    Exactly what I need !

  • @bernardinojr.delacruz5928
    @bernardinojr.delacruz5928 3 роки тому

    I really appreciate this. Thank you so much!

  • @christophercarr5865
    @christophercarr5865 3 роки тому +1

    Check out the Rainbow CSV extension for VS Code. Makes csv files more human eyeball parseable.

  • @connershafer6918
    @connershafer6918 4 роки тому +3

    What if I needed to take a column of a csv file and count how many times a word occurs?

  • @propilot7428
    @propilot7428 2 роки тому

    Great thank you!

  • @damegaye3051
    @damegaye3051 2 роки тому +1

    Cool vidéo 😍
    But how i do i want to print a single line by searching by the "precipitation" value for exemple ?

  • @takudzwaherbertmakopa4478
    @takudzwaherbertmakopa4478 2 роки тому +1

    what if the dictionaries are not the same in terms of [str, float ] format and some are even [str, str] format????

  • @zzxp1
    @zzxp1 3 роки тому +1

    But how do you do that when you want to convert different types of data in each row. Lets say one column has a boolean, another an int, and another a string?

  • @mikailstar4270
    @mikailstar4270 3 роки тому

    Simple and useful

  • @CaseySmith-d5v
    @CaseySmith-d5v 3 місяці тому

    What if I want to keep the first column as a string and convert the following columns to floats?

  • @christopherjspiteri
    @christopherjspiteri 3 роки тому +2

    How can we skip a header row in the csv file? i keep getting this:
    ValueError: could not convert string to float: 'Part'
    The word 'Part' is the first word in the csv file header.

    • @ajl240
      @ajl240 3 роки тому

      did you figure this out mate?

    • @brijeshsamal7035
      @brijeshsamal7035 3 роки тому

      the "next" function helps you with that.

  • @higiniofuentes2551
    @higiniofuentes2551 Рік тому

    If the separator is not comma, something to be done to indicate that?
    Thank you!

  • @xakeppro.548
    @xakeppro.548 3 роки тому

    Thanks man

  • @2hazeleyes
    @2hazeleyes Рік тому

    Is the dictionary reader built in to the most recent version of python?

  • @johnaweiss
    @johnaweiss 9 місяців тому

    How can you look up key/value pairs without looping?

  • @natedickinson6489
    @natedickinson6489 Рік тому

    How does the terminal printout work? around minute 7?

  • @Cos3D
    @Cos3D 2 роки тому

    how can we change a number in csv without it making the csv file unreadable ?

  • @sameerpal2474
    @sameerpal2474 2 роки тому

    Can we read columns of xml file which is inside csv file in python please reply

  • @karthikrajamony6044
    @karthikrajamony6044 3 роки тому

    Could you please share which theme and font you used in this video for VS Code

  • @nadiarusiecki5785
    @nadiarusiecki5785 Рік тому

    15:00 the day Apophis collided with earth

  • @tien9396
    @tien9396 3 роки тому

    I give u 1 sub :)

  • @dv5060
    @dv5060 2 роки тому

    THERE IS NO NEED TO EXPLAIN A MILLION TIMES WHAT CSV´S ARE....

  • @ssenyangeraymod2047
    @ssenyangeraymod2047 Рік тому

    Your video is not good for beginners