Python Pandas - Loading Multiple files into DataFrame - DataMites Courses

  Рет қаралды 29,307

DataMites

DataMites

Күн бұрын

Пікірлер: 83
@ravinderreddi
@ravinderreddi 3 жыл бұрын
I was looking for a wildcard to pick all the file in a folder since 3 hrs, you have made my life easy. I have been through all the complex code available online nothing worked, your code is simple and does the job.
@DataMites
@DataMites 3 жыл бұрын
Thank you for your comment.
@jobaute3984
@jobaute3984 4 жыл бұрын
I was looking for this and didn't realise it was that simple! Thanks
@DataMites
@DataMites 4 жыл бұрын
Thank you and welcome
@allieubisse470
@allieubisse470 4 жыл бұрын
I need for of this in my data Science life. You make everything light and easy. One concept per video. Short and sweet.
@ThankGodItsToday
@ThankGodItsToday 4 жыл бұрын
Glad it helped :-)
@bhayj
@bhayj 2 жыл бұрын
I checked many web-pages in google and nothing helped, but your video solved my issue. Thanks a lot!!!😀
@DataMites
@DataMites 2 жыл бұрын
Glad to hear that
@ATHARVA89
@ATHARVA89 3 жыл бұрын
just what i was looking for in my work
@VivianHarbison
@VivianHarbison Жыл бұрын
Thank you for such a succinct, and thorough video. Just what I needed. I followed along and got my files to all come together with one viewing of your video.
@DataMites
@DataMites Жыл бұрын
Glad it helped!
@darkphysics4561
@darkphysics4561 2 жыл бұрын
Wow...you made it look so simple and saved me tons of time with this video. Many thanks.
@DataMites
@DataMites 2 жыл бұрын
You're welcome!
@odeyemitemitope53
@odeyemitemitope53 Жыл бұрын
This just helped solved the issue i am having. Thank you!
@DataMites
@DataMites Жыл бұрын
Glad to hear it! Keep Watching
@MultiKasuku
@MultiKasuku 3 жыл бұрын
You Sir deserve 1 billion subscribers
@DataMites
@DataMites 3 жыл бұрын
Thank you. Please do subscribe and share with friends.
@karinabrouwer2733
@karinabrouwer2733 3 жыл бұрын
Thank you for explaining this. Ive watch many tutorials on YT but nothing worked but yours did.
@DataMites
@DataMites 3 жыл бұрын
"Hi Karina Brouwer, thank you for your comment."
@yichienchong7474
@yichienchong7474 2 жыл бұрын
Thank you sir! Your video saved me lots of time.
@DataMites
@DataMites 2 жыл бұрын
You're welcome!
@judytsai9013
@judytsai9013 3 жыл бұрын
Hello Sir! Thank you very much for sharing it. It helps a lot on the obstacles I’m having. I referenced this video to upload multiple .JSON, would you mind share suggestions if I want to flatten the nested node before concatenate files. Thank you!
@DataMites
@DataMites 3 жыл бұрын
Glad it was helpful!
@Abel_The_
@Abel_The_ 4 жыл бұрын
thank you. you are a life saver
@DataMites
@DataMites 4 жыл бұрын
Glad it helped!
@timothyhanson3694
@timothyhanson3694 Ай бұрын
Is there a way to include a column which shows what file the data has been pulled from?
@nikitamaru4198
@nikitamaru4198 Жыл бұрын
Thank you sir
@harithameka8328
@harithameka8328 2 жыл бұрын
thank you for the video sir i merge my multiple csv files into excel file output is it leaving one row when it printing the new file when it printing 10.csv it leaving 10rows then the data is going to print plz reply sir
@manojkarthicksriramulu8639
@manojkarthicksriramulu8639 3 жыл бұрын
thanks for the concept ....the logic you explained very simple to understand for a beginners
@DataMites
@DataMites 3 жыл бұрын
Glad it was helpful!
@manojkarthicksriramulu8639
@manojkarthicksriramulu8639 3 жыл бұрын
Can you explain..... Detailed concept of data cleaning null values, NaN, replace concept..... How to set data types.....
@multitaskprueba1
@multitaskprueba1 2 жыл бұрын
You are a genius! Thank you! What if the files share some columns but, we do not know which ones?
@DataMites
@DataMites 2 жыл бұрын
Can you please reframe your question?
@GodX36999
@GodX36999 3 жыл бұрын
Yeah thank for your great videos. But dear sir, if a folder have too much more file but we just want to pick some of them and concatenate as horizontal . So how can we do sir
@pallabiroy9091
@pallabiroy9091 3 жыл бұрын
Very helpful. Thankyou
@DataMites
@DataMites 3 жыл бұрын
Glad it was helpful!
@riyazbagban9190
@riyazbagban9190 2 жыл бұрын
sir i have plain text how can i add these text file in each cell or i have to add each text file in each row of datastet how to do it
@nidhi_singh9494
@nidhi_singh9494 Жыл бұрын
thank you for wonderful explanation. my query is , I have .csv files which are needed to drop first 20 rows in every files , and after that I needed to concat those all . any suggestions?
@DataMites
@DataMites Жыл бұрын
Use simple for loop to remove first 20 records from every file and then concatenate those files
@cynthiaphillips7143
@cynthiaphillips7143 2 жыл бұрын
Thank you very much. so now how can i save the new cancate data in txt file?
@DataMites
@DataMites 2 жыл бұрын
Check with np.savetxt() or df_object.to_csv('filename.txt')
@amolmzope
@amolmzope 4 жыл бұрын
Thank you so much sir
@DataMites
@DataMites 3 жыл бұрын
All the best
@gulshankumar17
@gulshankumar17 3 жыл бұрын
I use dask data frame for reading multiple file. something like import dask.dataframe as dd df = dd.read_csv('*.txt').compute()
@DataMites
@DataMites 3 жыл бұрын
Good work
@salamalsamman1314
@salamalsamman1314 3 жыл бұрын
Thank you!
@DataMites
@DataMites 3 жыл бұрын
You're welcome!
@mohammadtamimkashifi9570
@mohammadtamimkashifi9570 3 жыл бұрын
Great work!
@DataMites
@DataMites 3 жыл бұрын
Thanks!
@chinmaya.6934
@chinmaya.6934 4 жыл бұрын
Sir, can you tell how to add a new column of "source file name" in the dataframe? ) Purpose is like to know source of the data where it is coming from
@ThankGodItsToday
@ThankGodItsToday 4 жыл бұрын
You can directly assign it using dataframe.loc it creates column if doesn't exist
@chinmaya.6934
@chinmaya.6934 4 жыл бұрын
@@ThankGodItsToday Thanks for the response. Will check it out!
@dheerajkumark5602
@dheerajkumark5602 4 жыл бұрын
Sir plz make more pandas ,dask and scikit learn Videos
@ThankGodItsToday
@ThankGodItsToday 4 жыл бұрын
Sure.. will take time for this.
@yousfoss4367
@yousfoss4367 3 жыл бұрын
Please how to behave if you have three groups one of test file another of train file and the main file thks
@DataMites
@DataMites 3 жыл бұрын
Hi YOUS FOSS, you can manually set the location of files and read it using python.
@yousfoss4367
@yousfoss4367 3 жыл бұрын
@@DataMites thks a lot
@lilymaths4584
@lilymaths4584 3 жыл бұрын
Glob is such a useful but funny library!
@DataMites
@DataMites 3 жыл бұрын
"Hi Lily Maths, yes, glob is useful library."
@pierreclaude1345
@pierreclaude1345 2 жыл бұрын
Hi, thank you for great video. My question is how to include encoding='utf-8' ?
@DataMites
@DataMites 2 жыл бұрын
Using 'encoding' parameter in read_csv(). Kindly refer www.w3.org/International/questions/qa-what-is-encoding
@aakash2402
@aakash2402 3 жыл бұрын
Can we follow same procedure for JSON files as well?
@DataMites
@DataMites 3 жыл бұрын
Hi Aakash Thorat, yes you can provided that all json has similar structure and it can be loaded with pandas as dataframe
@satishkumar-ir9wy
@satishkumar-ir9wy 3 жыл бұрын
Sir can you help me to read multiple parquet files from miltiple directories
@DataMites
@DataMites 2 жыл бұрын
If we try to read more than one file the data gets overlapped. What we can do is to read different files to different variables and then concatenate them to a single variable.
@NishantKumar-dw5er
@NishantKumar-dw5er 3 жыл бұрын
Awesome
@DataMites
@DataMites 3 жыл бұрын
Thank You!
@tayseeruthman9525
@tayseeruthman9525 4 жыл бұрын
THANK YOU VERY MUCH
@DataMites
@DataMites 4 жыл бұрын
You're welcome!
@sarahferko2257
@sarahferko2257 3 жыл бұрын
Thank you! What if you are trying to do something similar with PDF files?
@DataMites
@DataMites 3 жыл бұрын
Hi Sarah Ferko, to work with pdf file there are lots of other packages like textract, PyPDF2, etc.
@hazelerturk9314
@hazelerturk9314 3 жыл бұрын
Thanks a lot for this! I have two empty files in 207 files. I believe it gives an error for those files in between. Is there a solution for those cases?
@DataMites
@DataMites 3 жыл бұрын
Hi you can always check if your file is empty or not.
@yousfoss4367
@yousfoss4367 3 жыл бұрын
thks a lot. what about multiple text files, please. thks
@DataMites
@DataMites 3 жыл бұрын
Hi YOUS FOSS, you can use for loop for txt files line a given directory and do processing like shown in video.
@yousfoss4367
@yousfoss4367 3 жыл бұрын
@@DataMites thks a lot
@GodX36999
@GodX36999 3 жыл бұрын
@@DataMites thank sir, but how can we do if we just wanna pick some of them with a list specified file name ( not all file in folder)
@pennylaine8703
@pennylaine8703 3 жыл бұрын
Thank you! :)
@DataMites
@DataMites 3 жыл бұрын
You're welcome!
@mariakosberg9244
@mariakosberg9244 3 жыл бұрын
Hi, I really liked this video however i am struggling to do the same with my 120 log files. The reasons for this is that the columns are not defined in the files. They exist in the files but on the same row as a descriptor for the files. I have 3 rows with descriptors on their own but then on the 4th row the descriptor shares the row with the columns names. Also, all the data set is separated with spaces so I need to set the delim_whitespaces= True function but i can't do that with concat. I can fixed the file when I used the the delim_whitespaces functions and adding 'names' = each column name but i don't manage with the concat function. Is anyone able to assist?
@DataMites
@DataMites 3 жыл бұрын
"Hi Maria Kosberg, Based on your query, you can remove top 'n' lines from your file by opening and saving a new txt file without those lines (you can automate this if you need to remove the same number(n) of top lines that you don't want in your data frame). After that, you can go with the approach suggested in the video itself. "
@sagarbhanage1832
@sagarbhanage1832 Жыл бұрын
I tried it but my file showing empty.
@DataMites
@DataMites Жыл бұрын
Check the file path
Turning multiple CSV files into a single pandas data frame
8:09
Python and Pandas with Reuven Lerner
Рет қаралды 31 М.
小路飞和小丑也太帅了#家庭#搞笑 #funny #小丑 #cosplay
00:13
家庭搞笑日记
Рет қаралды 13 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 10 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 13 МЛН
#5 Read and process multiple text files in Python
9:38
Data Skills for Everyone
Рет қаралды 24 М.
This INCREDIBLE trick will speed up your data processes.
12:54
Rob Mulla
Рет қаралды 269 М.
James Saryerwinnie - Downloading a Billion Files in Python
28:18
EuroPython Conference
Рет қаралды 2,1 М.
How to work with big data files (5gb+) in Python Pandas!
11:20
TechTrek by Keith Galli
Рет қаралды 41 М.
How to combine DataFrames in Pandas | Merge, Join, Concat, & Append
13:40