小编ICu*_*tis的帖子

How to efficiently find the inverse intersection between two large dataframes with pandas?

I am trying to find the inverse intersection between two large dataframes. I got it to work with the code snipped hereafter. Unfortunately, this approach is "too slow" on large dataframes as is further described below. Can you think of a quicker way to compute this outcome?

import pandas as pd

df_1 = pd.DataFrame({'a': [8, 2, 2],
                     'b': [0, 1, 3],
                     'c': [0, 2, 2],
                     'd': [0, 2, 2],
                     'e': [0, 2, 2]})

df_2 = pd.DataFrame({'a': [8, 2, 2, 2, …
Run Code Online (Sandbox Code Playgroud)

python intersection bigdata dataframe pandas

5
推荐指数
1
解决办法
1397
查看次数

标签 统计

bigdata ×1

dataframe ×1

intersection ×1

pandas ×1

python ×1