2020
12-14
12-14
Pandas DataFrame求差集的示例代码
在Pandas中求差集没有专门的函数。处理办法就是将两个DataFrame追加合并,然后去重。divident.append(hasThisYearDivident)noHasThisYearDivident=divident.drop_duplicates(subset='ts_code',keep=False,inplace=True,ignore_index=True)具体函数用法:https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.append.html#pandas.DataFrame.appendhttps://pandas.pydata.org/pandas-docs/stable/ref...
继续阅读 >