Skip to content
Advertisement

Creating a large dataframe out of 100 csv files (full join required)

I need to create a dataframe one 100+ csv file. My issues is that I have more than 100 CSVs with more than 55000 rows in each (as primary keys).

Now the difference between the csv files is that is all columns (maybe around 1200 columns) were broken into separate files. In other words, I need to do a FULL JOIN these csv files based on the PRIMARY row.

I got to the below code so far but need help to compelete it.

JavaScript

similar example is this:

JavaScript

Thanks in advance! :)

Advertisement

Answer

Convert PK column to index and then add axis=1 to concat:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement