great way but I found out this, it may help import os filepaths = [f for f in os.listdir(".") if f.endswith('.csv')] df = pd.concat(map(pd.read_csv, filepaths))
@nicolaslotsios14322 жыл бұрын
hello in what order are the elements imported? and how can i manipulate this order? thank you in advance
@qwqsimonade35802 жыл бұрын
Which way takes least amount of time?
@evertonsston Жыл бұрын
Simple and objective explanation! Thank you so much!
@BusinessScience Жыл бұрын
Glad it was helpful!
@osssosos Жыл бұрын
hi, how do you make the code results (output) appear in interactive like that
@tranglinh1087 Жыл бұрын
thank you so much !
@satviksrivastava95042 жыл бұрын
Hi, i have multiple csv files with each one having a json file describing it as well. I need to get some of that data from json file to csv file. How do i do that, i have around 80+ folders and each folder has around 100+ csv and json files. My lead says that the final data must be a csv file with each row of that csv file another csv file. I know it sounds ridiculous but i don't know how to proceed??
@BusinessScience2 жыл бұрын
Sounds rough, but this is what I would do. I'd break the problem down into small tasks. Write loops only when one thing is working. Try the loop on a subset (not the whole thing). Address any errors / problems. Then scale to the full problem once you have built a small working code script.
@howardpiwang77792 жыл бұрын
How do I plot these multiple csv files on the same say 3dgraph
@KishorKumar-on2lw2 жыл бұрын
how to import different file names csv files
@tagifts2 жыл бұрын
example is for .csv, but assuming that it works for any extension
@BusinessScience2 жыл бұрын
Yes just change the reading function
@tucuongtran79602 жыл бұрын
how can I sort multiple csv files by "timestamp" and then rewrite it ? all in 1 folder and they all have the same headers.
@dishaverma85272 жыл бұрын
I got NaN for the entire table after using concat.
@BusinessScience2 жыл бұрын
Your path is probably not correct. This is what happens when the function cannot find the file.
@lambertnsengimana41042 жыл бұрын
How do you select automatically some files to import rather than importing all the files.