{11: [3], 22: [4], 33: [5], 44: [22]} # the dict key will always have a single value in a list 现在我想过滤上面的数据帧,这样对于列A和列B中的每个值,如果A_ column _dct的值存在于B_column_dct的相应值中,那么它应该只出现在df中。最终结果df: A B 44 4
给定以下数据帧,我尝试使用pandas来提取列"Total“,其中"Year”是2015 - 2020年。 Year Yield Total ...7.02% 1.5 ... 2019-05-17 2019-05-31 如果2020年的数据存在,我使用的代码可以工作: counter = 5
for index, row in df.iterrows