【发布时间】:2019-02-06 14:51:38
【问题描述】:
我有两个数据框 - 一个由用户从 powerapp 编辑。另一个直接来自 onedrive。
列标题几乎相同,我需要比较两个数据帧并将任何新行添加到来自 powerapps 的数据帧中。以下是两个示例数据框:
Powerapps 数据框:
Send/Collect Hospital Courier Kit Manufacturer Status
0 Send Nuffield Ipswich Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx Not Started
1 Send BMI Rosshal Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx In Progress
2 Collect Stepping Hill Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx Not Started
3 Collect York District Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx Not Started
4 Royal Devon Exeter NaN NaN ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx Not Started
5 collect Spire Bristol Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx Complete
6 Send Bridlington Courier ToeMotion - MTP DF Arthrosurface Hire Log 2018.xlsx Not Started
7 Send Femoral Head Hampshire Clinic DHL Human Tissue Human Tissue Log.xlsx Not Started
Onedrive 数据帧:
Send/Collect Hospital Courier Kit Manufacturer
0 Send Nuffield Ipswich Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
1 Send BMI Rosshal Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
2 Collect Stepping Hill Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
3 Collect York District Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
4 Royal Devon Exeter ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
5 collect Spire Bristol Courier ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
6 Royal Devon Exeter ActivMotion (HTO - DFO) NewClip Hire Log 2018.xlsx
7 Send Bridlington Courier ToeMotion - MTP DF Arthrosurface Hire Log 2018.xlsx
8 Send Femoral Head Hampshire Clinic DHL Human Tissue Human Tissue Log.xlsx
如您所见,powerapps 数据框有一个不同的列(它可以包含不同的值,而不仅仅是“未启动”),而 onedrive 数据框有一个额外的行(需要进入 powerapps df)。
另请注意,虽然来自 onedrive 数据帧的空单元格是一个字符串“”,但从 powerapps 来说它是 nan。
我需要将 onedrive 中的额外行合并到 powerapps(将“未启动”状态添加到该行)。我认为我需要一种方法,该方法将根据第 0,3 列和第 4 列中的相似性进行合并,同时忽略第 1,2 列和第 5 列。我该怎么做?
【问题讨论】:
-
我喜欢你图片的背景,但因为是图片,所以我忍不住......
-
对不起,这是一个 pycharm 的东西!让我在空闲时运行它,我将编辑
-
@Wen 已编辑 - 希望这对您来说会更容易!
-
您只是想将丢失的行从 onedrive 合并到 powerapps,还是尝试对 onedrive 进行更改?目前我还不完全清楚。
-
我正在尝试将丢失的行从 onedrive 添加到 powerapps @d_kennetz