I would like to left join df1 and df2 and get records from df1(left table only). I am trying with below code but I get memory error.
df1.merge(df2, indicator='i', how='outer',on=['col1']).query('i == "left_only"').drop('i', 1)
df1:
ID
QA00797310082
IS00797320000
QA12567318888
WS00565610099
MA10897310022
df2:
ID
QA00797310082
IS00797320000
QA12567318888
WS00565610099
MA10897310022
I am trying to join on ID column and both the dataframes have just one column each. Error:
Unable to allocate 2.82 GiB for an array with shape (1, 379038888) and data type object
I tried with removing all extra columns but I still end up with this error.
Is there any other way of getting all the records from left table only ?