I have two really large dataframes that I'd like to merge, but can't because my computer's memory cannot handle it. Instead, I would like to split one of the dataframes into smaller dataframes by group (of which there are 195 groups, so 195 dataframes), and then join each of those 195 dataframes to the other large dataframe.
So far I have tried groupby:
split_data = list(bigdata1.groupby("GROUP"))
Which results in a list of the 195 dataframes
I would now like to know how to apply the joining function defined below to each of the dataframes, and have each of the dataframes separated and able to be called for subsequent manipulation (e.g. analysis). I am brand new to python so any assistance would be greatly appreciated. Thanks in advance
def joining_function(df):
pd.merge(df, bigdata2, on = 'PERSON_ID', how = 'left')