I have a DataFrame with a column that needs to be filled with values from a big csv file. What would be the best (possibly memory and computation efficient) way to load in the csv file and left-join the data to the DataFrame?
The approaches I have tried/considered:
- Load in the csv file as a DataFrame and use pandas functions to join: However, this fails with loading in the csv into the memory with a MemoryError.
- Load in the csv file in a database and use a left join query: I have not tried this one yet, but I hope to avoid a MemoryError.