I have a folder named 'training' in my local drive which has 20000 .psv files. I zipped it and uploaded to google collaboratory, with the upload option in the Files section. I unzipped it with the following command.

!unzip training

Now I have a folder called training in Files. Each file contains 40 columns which are same for all the files and rows of different lengths.I wish to merge all the files. The resulting file should contain all the rows of all the files with 40 columns(ignore the index columnas to avoid duplicate index). The header should have column names since they are common to all the files. The merged file should be converted to a single data frame. Thanks in advance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.