0
在Python字典也很乾淨做以下檢查:檢查,如果熊貓系列包含了一組變量:
import pandas as pd
myDict = {'a':1, 'b':2, 'c':3}
mySeries = pd.Series(data = [1,2,3], index = ['a', 'b', 'c'])
if myDict.viewkeys() >= {'a', 'b'}:
print 'a and b are in dictionary'
但是,我無法找到一個簡單的方法來與大熊貓同系列......這是pythonic的方式?
對不起你後:http://stackoverflow.com/questions/ 12065885 /如何對過濾器的-數據幀行 - 的 - 大熊貓按內,在?如果是的話那麼這是一個騙局 – EdChum