How to pull data from a CSV file in Python

  Рет қаралды 74,045

Chewy

Chewy

Күн бұрын

Пікірлер: 42
@ateabag8410
@ateabag8410 2 ай бұрын
Thank you so much ! My teacher didn't explain even what is a csv file but gave a task to do. Thank you, you're my savior
@Chewy21414
@Chewy21414 2 ай бұрын
@@ateabag8410 glad it helped
@thefrub
@thefrub 10 ай бұрын
Thank you for the explanation, I'm working on a project that has almost this exact problem rn and this helped me understand it better
@Chewy21414
@Chewy21414 10 ай бұрын
Glad it helped thank you for watching ☺️
@dragrobin
@dragrobin 3 ай бұрын
bro i love you, now i new to learn how to save this data
@Chewy21414
@Chewy21414 3 ай бұрын
@@dragrobin glad it helped seems like a lot of people needed this video lol
@lomar-om6hc
@lomar-om6hc 8 ай бұрын
Thank you so much for your video! I’ve learned a lot! I have one question, how am I able to do the exact same function without csv.reader? My professor doesn’t want us using that, and I’m not sure how else to do it.
@Chewy21414
@Chewy21414 8 ай бұрын
I wish I could be more helpful but it's been so long time since I did this video I really don't know. I haven't had to do anything with data and CSV files in a long time. I have been trying to learn C# and Unity/game development.
@lomar-om6hc
@lomar-om6hc 8 ай бұрын
@@Chewy21414 that’s alright, I understand! Thank you for your help and responding back! I really appreciate it!
@siphosakhesiqiniseko8561
@siphosakhesiqiniseko8561 27 күн бұрын
In my my pycharm(windows) 2024 it is not working, how do I link up the data with my project??
@esmaben1
@esmaben1 9 ай бұрын
Thank you for this video! I have a question: How to would be, if i want that myList had a array of objects?
@Chewy21414
@Chewy21414 9 ай бұрын
Hey I'm glad you liked the video. Unfortunately I haven't done anything with python in a while so I don't know the answer to your question right now. I haven't kept up with this type of coding since I finished college. However maybe this could help? stackoverflow.com/questions/7925539/store-and-retrieve-objects-from-python-lists
@martinruzi
@martinruzi 2 ай бұрын
thanks man
@Chewy21414
@Chewy21414 2 ай бұрын
@@martinruzi np glad it helped
@adanordonez7241
@adanordonez7241 Жыл бұрын
In 5:50, how can I append to the list all the values that are located in just one column?
@Chewy21414
@Chewy21414 Жыл бұрын
It's been awhile since I have done anything with text files in Python. But if I were to do it I think I would just set up a loop to modify the particular index from each row that I wanted. Again like I said I haven't done much with python in awhile so sorry if my answer is not very helpful. If you figure out how to do it though reply to this comment with the answer so the other people looking to do the same will have the answer.
@BitaAzari-y1k
@BitaAzari-y1k 2 ай бұрын
thank you , how can i let user drag and drop csv file without need of addressing csv file everytime e.g. filename.csv
@Chewy21414
@Chewy21414 2 ай бұрын
I'm not sure I have always used the way I show here. I haven't really explored more with CSV files since I finished college.
@adey1434
@adey1434 2 жыл бұрын
How can we extract data against specific date from column?
@sagarsrinivas457
@sagarsrinivas457 Жыл бұрын
how to extract text (if possible specific section text ) from multiple resume extension as doc,docx, pdf and save all into a new csv file in 3 row data entry system.
@Chewy21414
@Chewy21414 Жыл бұрын
I am not sure at this point. I haven't done a lot with text files and python in a while I have been learning #C and game development in Unity.
@KristopherWeitlauf
@KristopherWeitlauf 10 ай бұрын
Thanks for the video. I have a question. I am trying to take 9 different raw data files, convert to csv, parse as needed, fix missing values, etc. Run exploratory analysis on the csv using python. Then I have to take those 9 files and combine into one file and run exploratory analysis. Do I need to use excel to convert to CSV first for each one or can I use python to perform that function for me. How do I import the files into my python project so I do not have to use pathways? I appreciate any help. Good video.
@Chewy21414
@Chewy21414 10 ай бұрын
Hey thank you for watching. I don't recall a time where I had to convert files but I'm pretty sure python has a function that can handle converting the files to csv. Importing the files into your project is just a matter of saving the files in the correct location. If you save them inside a fold where your project is you should be able to access them without having to use an absolute file path. Not sure if that helps much but hope you are able to figure it out and complete your project.
@yaweli2968
@yaweli2968 2 жыл бұрын
I wish you could show how to extract specific columns, but thanks for the video
@Chewy21414
@Chewy21414 2 жыл бұрын
I have a couple other videos on text files that might help check my playlists. I thought I went over that in one of them it's been awhile since I did it though so I'm not sure.
@yaweli2968
@yaweli2968 2 жыл бұрын
Please drop a link. I have trying to look it up
@Chewy21414
@Chewy21414 2 жыл бұрын
@@yaweli2968 try one of these videos kzbin.info/www/bejne/rKOvkJZmodZ_i6c kzbin.info/www/bejne/eGLKmIaknbKse7M
@vanishreevelmurugan7225
@vanishreevelmurugan7225 Жыл бұрын
what is the tool you are working now? i have downloaded python setup but my screen is not same as you working in the video now. Please tell me what to install to type the code like you do
@Chewy21414
@Chewy21414 Жыл бұрын
I am using IntelliJ, I have a video on how to set python up with it. kzbin.info/www/bejne/hYeZnGZpfK1ljM0
@thippeswamykv2527
@thippeswamykv2527 2 жыл бұрын
how to store the data in CSV FILES proper format using python
@Chewy21414
@Chewy21414 2 жыл бұрын
Are you asking how to explort data from a python project into a csv file in a certain format? I have a few other videos on my channel with text files check those out and if you still have questions feel free to join my discord and chat.
@thippeswamykv2527
@thippeswamykv2527 2 жыл бұрын
@@Chewy21414 That's grate thanks if you don't ,mind can you please share the vdo link
@Chewy21414
@Chewy21414 2 жыл бұрын
@@thippeswamykv2527 Here are the links to the other two videos and also the link to my discord kzbin.info/www/bejne/eGLKmIaknbKse7M kzbin.info/www/bejne/rKOvkJZmodZ_i6c discord.gg/KehtBFGh
@prisharai792
@prisharai792 Жыл бұрын
what software is this?
@Chewy21414
@Chewy21414 Жыл бұрын
The IDE called IntelliJ I have a video on my KZbin about how to set up Python inside IntelliJ.
@prisharai792
@prisharai792 Жыл бұрын
okay thanks@@Chewy21414
@TheCopperMystic
@TheCopperMystic 9 ай бұрын
You are so handsome and your voice. Gosh!
@reddeadcobra8295
@reddeadcobra8295 2 жыл бұрын
Let’s say I have a csv file with 2 columns. I have years on one column and sales amount in the second. The issue I am having is that I don’t know how to make a list with the year because I need to calculate the means for them. How would I create a list with all the years
@robn2497
@robn2497 Жыл бұрын
once you have a list of lists, example = [[year , sales_amount] , [1999, 10,000 ], [2000, 15,000], [2001, 17,000] ] to access the year 1999 use index 1 which maps too [1999, 10,000 ], so A = example[1], A will now contain [1999, 10,000 ], u can now access the year --> 1999 OR sales--> 10,000 using indexing again, B =A[0] would be 1999 OR C =A[1] would be 10,000 remember python indexes start from zero so 1st element [0] 2nd [1] 3rd [2] ect ect. Its just a 2 step process, you could write a loop to do this systematically append() to make a list containing whatever you wanted to average (find the mean).
@discere5811
@discere5811 2 жыл бұрын
I am getting an error; NameError: name 'filename' is not defined how do I fix this? I hope you answer my question, thank you in advance.
@Chewy21414
@Chewy21414 2 жыл бұрын
Do you have the import csv at the top?
@Chewy21414
@Chewy21414 2 жыл бұрын
Also make sure you have filename as a parameter of the load_data function.
Python Tutorial: CSV Module - How to Read, Parse, and Write CSV Files
16:12
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 599 М.
LAVROV's interview with Tucker CARLSON 😁 [Parody]
8:34
Юрий ВЕЛИКИЙ
Рет қаралды 400 М.
Я купил Lada Aura
41:40
Клубный сервис
Рет қаралды 557 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 763 М.
Python Tutorial: File Objects - Reading and Writing to Files
24:33
Corey Schafer
Рет қаралды 1,8 МЛН
12 VS Code Extensions to INCREASE Productivity 2024
27:13
Devression
Рет қаралды 823 М.
CSV Column To Python List
5:37
DataEng Uncomplicated
Рет қаралды 35 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН