Python Pandas用户警告:正在排序,因为未串联的轴未对齐
我正在做一些代码练习,并在收到用户警告的同时应用数据帧合并 /usr/lib64/python2.7/site-packages/pandas/core/frame.py:6201:FutureWarning:排序是因为未串联的轴未对齐。熊猫的未来版本将更改为默认情况下不排序。要接受将来的行为,请传递“ sort = True”。要保留当前行为并消除警告,请传递sort = False 在这些代码行上:您能帮忙获得此警告的解决方案吗? placement_video = [self.read_sql_vdx_summary, self.read_sql_video_km] placement_video_summary = reduce(lambda left, right: pd.merge(left, right, on='PLACEMENT', sort=False), placement_video) placement_by_video = placement_video_summary.loc[:, ["PLACEMENT", "PLACEMENT_NAME", "COST_TYPE", "PRODUCT", "VIDEONAME", "VIEW0", "VIEW25", "VIEW50", "VIEW75", "VIEW100", "ENG0", "ENG25", "ENG50", "ENG75", "ENG100", "DPE0", "DPE25", "DPE50", "DPE75", "DPE100"]] # print (placement_by_video) placement_by_video["Placement# Name"] …