0
提取行,我有两个pandas
dataframes为:通过比较按键键
df1.ix[1:5]
Keys ColName
1 LOSTP LOSTP1
2 LOSTP LOSTP2
3 LOSTP LOSTP3
4 GIDEO GIDEOasdun
5 sdfff sdfffvrf
df2.ix[1:5]
Keys ColName
2 LOSTQ LOSTQ2
3 LOSTR LOSTR3
5 sdfff sdfffvrf
我想提取df1
如下:
Keys ColName
1 LOSTP LOSTP1
2 LOSTP LOSTP2
3 LOSTP LOSTP3
4 GIDEO GIDEOasdun
这意味着df1['keys] difference df2['keys']
。即通过在keys
列