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
列