Python: merge csv files with different column subsets -


I have several large CSV files which I would like to merge in, even though not all the CSV files contain all the columns. So I need to merge by column name, not the position of the column.

In the merged CSV, the value for the cell coming from a cell must be empty, which did not have a column of that cell.

I can not use the Panda module because it runs me out of memory.

Is there a module that can code something easy?

I am giving code below to generate 2 CSV files, what would I like to do tempdf1.csv and tempdf2.csv in such a way that I get tempdf3.csv. Imported pandas as pd df1 = pd.DataFrame ([["location": "A", "temperature": 20, "weather": "clean", "wind": " "," "Space": "b", "temperature": "", "weather" "", "temperature": 14, "weather": "", "bad", "wind ":" "," Latitude ": 42}]) df2 = pd.DataFrame ([{" location ":" c "," temperature "" word ": 12," wind ": 44}, {" location ": Df1.to_csv ("C: /tempdf1.csv") df2.to_csv ("D", "Temperature": "", "Weather": "", "Wind": 0, "Longitude": 11}]) C: /tempdf2.csv ") df3 = pd.DataFrame ([{" location ":" A "," longitude ":", "" temperature ": 20," weather ":" proper "," wind ":" "," "Space": "b", "longitude": "", "temperature": "", "weather": "bad", " Or ":", "latitude": 42}, {"location": "c", "temperature": 14, "weather": "" "" longitude ": 12," wind ": 44," latitude ": ("C: /tempdf3.csv"): "," "space": "D", "temperature": "", "weather": "", "wind": 0, "longitude" / Code>


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -