【发布时间】:2021-09-08 19:09:43
【问题描述】:
我需要阅读两个电子表格(比如说 SS1 和 SS2)。然后必须阅读 SS1 中的描述列并在 SS2 中搜索最近日期的类似描述。必须将输出写入另一个电子表格,其中包含唯一匹配描述及其最新日期和价格。
以下输入和输出示例供参考: SS1:
| S.No | Product | Product_Description |
|---|---|---|
| 1 | Shirt | Monte Carlo Men Shirt |
| 2 | Shirt | Belmonte Shirt Cotton |
| 3 | Shirt | US Polo tshirt men |
| 4 | Shirt | Monte Carlo tshirt |
| 5 | Shirt | Monte Carlo Men Shirt |
| 6 | Suit | Louis Philippe wrinkle free |
| 7 | Suit | Park Avenue |
| 8 | Suit | Van Heusen |
| 9 | Watches | Titan Men Wrist Type |
| 10 | Watches | Casio |
| 11 | Watches | Titan Women Wrist Type |
| 12 | Watches | Rolex |
| 13 | Watches | Casio |
SS2:
| S.No | Product | Product_Description | Purchase_Date | Quantity | Price | Net Value |
|---|---|---|---|---|---|---|
| 1 | Watches | Casio | Jan-19 | 10 | 5000 | 50000 |
| 2 | Watches | Rolex | May-20 | 2 | 500000 | 1000000 |
| 3 | Shirt | Monte Carlo tshirt | Feb-20 | 20 | 2000 | 40000 |
| 4 | Suit | Raymond | Jan-20 | 50 | 10000 | 500000 |
| 5 | Watches | Lois Moinet | May-21 | 3 | 60000 | 180000 |
| 6 | Shirt | Peter England | Apr-21 | 40 | 1800 | 72000 |
| 7 | Watches | Casio | Mar-19 | 30 | 5500 | 165000 |
| 8 | Shirt | Monte Carlo Men Shirt | Jun-19 | 10 | 3000 | 30000 |
| 9 | Shirt | Monte Carlo Men Shirt | Apr-20 | 12 | 3100 | 37200 |
| 10 | Watches | Rolex | Dec-20 | 4 | 505000 | 2020000 |
| 11 | Suit | Louis Philippe wrinkle free suit | Jun-21 | 9 | 20000 | 180000 |
| 12 | Suit | Allen Solly | Jan-21 | 12 | 4000 | 48000 |
| 13 | Shirt | Monte Carlo tshirt | Apr-21 | 15 | 2500 | 37500 |
输出:
| S.No | Product | Product_Description | Purchase_Date | Price |
|---|---|---|---|---|
| 1 | Shirt | Monte Carlo Men Shirt | Apr-20 | 3100 |
| 2 | Shirt | Monte Carlo tshirt | Apr-21 | 2500 |
| 3 | Suit | Louis Philippe wrinkle free suit | Jun-12 | 20000 |
| 4 | Watches | Casio | Mar-19 | 5500 |
| 5 | Watches | Rolex | Dec-20 | 505000 |
【问题讨论】:
-
到目前为止你尝试了什么?
标签: python pandas string text comparison